# Create Person — Attio

> Create a new person record in Attio. Use when adding a contact. Set any of the person fields (name, email, job title, phone, socials) and optionally link a company by its record id. Example: First Name Ada, Last Name Lovelace, Email…

- Key: `attio-create-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/create-person
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/attio/actions/create-person/create-person.mjs

## Description

Create a new person record in Attio. Use when adding a contact. Set any of the person fields (name, email, job title, phone, socials) and optionally link a company by its record id. Example: First Name `Ada`, Last Name `Lovelace`, Email `ada@example.com`, Job Title `Analyst`. Returns the created person record with its id. [See the documentation](https://developers.attio.com/reference/post_v2-objects-people-records).

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `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-create-person",
  arguments: {
    firstName: "First Name",
    lastName: "Last 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-create-person",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    attio: { authProvisionId: "apn_xxxxxxx" },
    firstName: "First Name",
    lastName: "Last 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-create-person",
    "configured_props": {
      "attio": { "authProvisionId": "apn_xxxxxxx" },
      "firstName": "First Name",
      "lastName": "Last Name"
    }
  }'
```

---

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