# Update Person — Attio

> Update an existing person record by its ID; only the fields you set are changed. Use Get Record (object people) or the Person ID lookup to find the Person ID first. Example: Person ID 891dcbfc-9141-415d-9b2a-2238a6cc012d, Job Title VP…

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

## Description

Update an existing person record by its ID; only the fields you set are changed. Use **Get Record** (object `people`) or the Person ID lookup to find the **Person ID** first. Example: Person ID `891dcbfc-9141-415d-9b2a-2238a6cc012d`, Job Title `VP Sales`, Email `ada@example.com`. Returns the updated person record. [See the documentation](https://developers.attio.com/reference/patch_v2-objects-people-records-record-id).

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `recordId` | `string` | Yes | The identifier of the contact to update. Use the List Records action (object people) to look up person record IDs. Options are loaded from the connected account. |
| `firstName` | `string` | No | The person's first name. |
| `lastName` | `string` | No | The person's last name. |
| `emailAddress` | `string` | No | The contact's email address. |
| `description` | `string` | No | A description of the person. |
| `jobTitle` | `string` | No | The person's job title. |
| `phoneNumber` | `string` | No | The person's phone number which is either a) prefixed with a country code (e.g. +44....) or b) a local number, where Phone Number - Country Code is specified in addition. |
| `phoneNumberCountryCode` | `string` | No | The country code for the phone number. |
| `linkedin` | `string` | No | The person's LinkedIn profile URL. |
| `twitter` | `string` | No | The person's Twitter handle. |
| `facebook` | `string` | No | The person's Facebook profile URL. |
| `instagram` | `string` | No | The person's Instagram profile URL. |
| `companyId` | `string` | No | The ID of the company to associate with the person. Use the List Records action (object companies) to look up company record IDs. Options are loaded from the connected account. |

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

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: "attio-update-person",
  arguments: {
    recordId: "Person ID",
    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: "attio-update-person",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    attio: { authProvisionId: "apn_xxxxxxx" },
    recordId: "Person ID",
    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": "attio-update-person",
    "configured_props": {
      "attio": { "authProvisionId": "apn_xxxxxxx" },
      "recordId": "Person ID",
      "firstName": "First Name"
    }
  }'
```

---

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