# Submit Ham — Akismet

> Submit a comment that was incorrectly classified as spam. See the documentation

- Key: `akismet-submit-ham`
- Type: Action (Write)
- Version: 0.0.2
- App: Akismet (`akismet`) — https://pipedream.com/apps/akismet.md
- This page (HTML): https://pipedream.com/apps/akismet/actions/submit-ham
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/akismet/actions/submit-ham/submit-ham.mjs

## Description

Submit a comment that was incorrectly classified as spam. [See the documentation](https://akismet.com/developers/detailed-docs/submit-ham-false-positives/)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `blog` | `string` | Yes | The URL of the blog where the comment was posted |
| `userIp` | `string` | Yes | The IP address of the comment author |
| `permalink` | `string` | Yes | The full permanent URL of the entry the comment was submitted to |
| `userAgent` | `string` | No | The user agent string of the web browser used to submit the comment |
| `commentAuthor` | `string` | No | The name submitted with the comment |
| `commentAuthorEmail` | `string` | No | The email address submitted with the comment |
| `commentAuthorUrl` | `string` | No | The URL submitted with the comment |
| `commentContent` | `string` | No | The content of the comment itself |
| `commentType` | `string` | No | The type of comment |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "akismet",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "akismet-submit-ham",
  arguments: {
    blog: "Blog URL",
    userIp: "User IP",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "akismet-submit-ham",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    akismet: { authProvisionId: "apn_xxxxxxx" },
    blog: "Blog URL",
    userIp: "User IP",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "akismet-submit-ham",
    "configured_props": {
      "akismet": { "authProvisionId": "apn_xxxxxxx" },
      "blog": "Blog URL",
      "userIp": "User IP"
    }
  }'
```

---

- App: https://pipedream.com/apps/akismet.md · All apps: https://pipedream.com/apps
