# Create Or Update Prospect — Woodpecker.co

> This action creates/updates a prospect. See the docs here

- Key: `woodpecker_co-create-update-prospect`
- Type: Action (Write)
- Version: 0.0.2
- App: Woodpecker.co (`woodpecker_co`) — https://pipedream.com/apps/woodpecker-co.md
- This page (HTML): https://pipedream.com/apps/woodpecker-co/actions/create-update-prospect
- Hints: destructive · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/woodpecker_co/actions/create-update-prospect/create-update-prospect.mjs

## Description

This action creates/updates a prospect. [See the docs here](https://woodpecker.co/help/api-managing-prospects/)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `id` | `integer` | No | Prospect's ID. Options are loaded from the connected account. |
| `firstName` | `string` | No | Prospect's first name. |
| `lastName` | `string` | No | Prospect's last name. |
| `email` | `string` | Yes | Prospect's email address. |
| `company` | `string` | No | Name of the company prospect is assigned to. |
| `industry` | `string` | No | Type of industry prospect is working in. |
| `website` | `string` | No | Website address. |
| `tags` | `string` | No | Prospect's tags. |
| `title` | `string` | No | Prospect's job title. |
| `phone` | `string` | No | Prospect's phone number. |
| `address` | `string` | No | Prospect's address. |
| `city` | `string` | No | Prospect's city. |
| `state` | `string` | No | Prospect's state or another geographical region he's living in. |
| `country` | `string` | No | Prospect's country. |
| `snippet` | `object` | No | Any snippet provided for a prospect. Use snippet1, snippet2… snippet15 to sort prospects by chosen custom field. |

## 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": "woodpecker_co",
      },
    },
  },
)

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: "woodpecker_co-create-update-prospect",
  arguments: {
    id: 10,
    firstName: "First Name",
  },
})
```

**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: "woodpecker_co-create-update-prospect",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    woodpecker_co: { authProvisionId: "apn_xxxxxxx" },
    id: 10,
    firstName: "First Name",
  },
})

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": "woodpecker_co-create-update-prospect",
    "configured_props": {
      "woodpecker_co": { "authProvisionId": "apn_xxxxxxx" },
      "id": 10,
      "firstName": "First Name"
    }
  }'
```

---

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