# Create Person — Agendor

> Create Person See the documentation.

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

## Description

Create Person [See the documentation](https://api.agendor.com.br/docs/#operation/Create%20person).

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `name` | `string` | Yes | Name of this person. |
| `cpf` | `string` | No | Legal document number (CPF) |
| `organizationId` | `string` | No | The ID of the organization to retrieve. Options are loaded from the connected account. |
| `role` | `string` | No | Person's role in their organization |
| `ranking` | `string` | No | Ranking displayed as stars in the page. |
| `description` | `string` | No | Your description of this person. |
| `birthday` | `string` | No | Person's birthday with or without year (YYYY-MM-DD or MM-DD). |
| `ownerUser` | `string` | No | User ID or email of the owner of this person. Options are loaded from the connected account. |
| `contact` | `object` | No | Contact object can have the following properties: email, work, mobile, fax, whatsapp, facbeook, twitter, instagram, linked_in, skype. Please check the documentation in the description for more information. |
| `address` | `object` | No | Address Object can have the following properties: postal_code, country, district, state, street_name, street_number, additional_info, city. Please check the documentation in the description for more information. |
| `leadOrigin` | `string` | No | Lead origin. Options are loaded from the connected account. |
| `category` | `string` | No | Category ID or name. Options are loaded from the connected account. |
| `products` | `string[]` | No | Array of product IDs. Options are loaded from the connected account. |
| `allowedUsers` | `string` | No | Array of IDs of users that should be able to see this person. Options are loaded from the connected account. |
| `allowToAllUsers` | `boolean` | No | Set true if this person should be visible to all users. |
| `customFields` | `object` | No | Custom fields information. |

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

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: "agendor-create-person",
  arguments: {
    name: "Name",
    cpf: "Legal Document Number (CPF)",
  },
})
```

**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: "agendor-create-person",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    agendor: { authProvisionId: "apn_xxxxxxx" },
    name: "Name",
    cpf: "Legal Document Number (CPF)",
  },
})

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": "agendor-create-person",
    "configured_props": {
      "agendor": { "authProvisionId": "apn_xxxxxxx" },
      "name": "Name",
      "cpf": "Legal Document Number (CPF)"
    }
  }'
```

---

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