# Update Prospect — Klenty

> Updates an existing prospect's information in Klenty. See the documentation

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

## Description

Updates an existing prospect's information in Klenty. [See the documentation](https://www.klenty.com/developers)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `list` | `string` | Yes | The list you want to add the Prospect to. Options are loaded from the connected account. |
| `prospect` | `string` | Yes | The prospect to interact. Options are loaded from the connected account. |
| `email` | `string` | No | The prospect's email address. |
| `firstName` | `string` | No | The prospect's first name. |
| `company` | `string` | No | The Prospect's company name. |
| `fullName` | `string` | No | The Prospect's full name. |
| `lastName` | `string` | No | The Prospect's last name. |
| `middleName` | `string` | No | The Prospect's middle name. |
| `account` | `string` | No | The Prospect's Account field. |
| `department` | `string` | No | The Prospect's Department field. |
| `companyDomain` | `string` | No | The Prospect's Company Domain field. |
| `title` | `string` | No | The Prospect's Title field. |
| `location` | `string` | No | The Prospect's Location field. |
| `phone` | `string` | No | The Prospect's Phone field. |
| `twitterId` | `string` | No | The Prospect's Twitter Id field. |
| `companyPhone` | `string` | No | The Prospect's Company Phone field. |
| `companyEmail` | `string` | No | The Prospect's Company Email field. |
| `linkedinURL` | `string` | No | The Prospect's Linkedin URL field. |
| `city` | `string` | No | The Prospect's City field. |
| `country` | `string` | No | The Prospect's Country field. |
| `newList` | `string` | No | The list where the prospect is going. Options are loaded from the connected account. |
| `tags` | `string[]` | No | A list of tags. |

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

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: "klenty-update-prospect",
  arguments: {
    list: "List",
    prospect: "Prospect",
  },
})
```

**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: "klenty-update-prospect",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    klenty: { authProvisionId: "apn_xxxxxxx" },
    list: "List",
    prospect: "Prospect",
  },
})

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": "klenty-update-prospect",
    "configured_props": {
      "klenty": { "authProvisionId": "apn_xxxxxxx" },
      "list": "List",
      "prospect": "Prospect"
    }
  }'
```

---

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