# Create Contact — Superdocu

> Create a new contact in Superdocu. Returns the created contact including its id, which you can then pass as contactId to Create Dossier to assign a workflow. See the documentation.

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

## Description

Create a new contact in Superdocu. Returns the created contact including its `id`, which you can then pass as **contactId** to **Create Dossier** to assign a workflow. [See the documentation](https://developers.superdocu.com/api/index.html).

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `firstName` | `string` | Yes | The contact's first name. |
| `lastName` | `string` | Yes | The contact's last name. |
| `email` | `string` | Yes | The contact's email address, e.g. jane.doe@acme.com. |
| `phone` | `string` | No | The contact's phone number. |
| `companyName` | `string` | No | The contact's company name. |
| `companySiret` | `string` | No | 14-digit SIRET identifier for the contact's company, e.g. 73282932000074. Find the SIRET on a company's detail page in Superdocu or from an official business registry. |
| `companySiren` | `string` | No | 9-digit SIREN identifier for the contact's company, e.g. 732829320 (the first 9 digits of the SIRET). Find the SIREN on a company's detail page in Superdocu or from an official business registry. |
| `locale` | `string` | No | The contact's locale. One of: en, fr, de, nl, pt, es. |
| `notes` | `string` | No | Free-text notes about the contact. |
| `tagIds` | `string[]` | No | Integer IDs of tags to assign to the contact, e.g. [123, 456]. Find tag IDs in the Tags section of your Superdocu account settings. |
| `trackingParams` | `object` | No | Arbitrary tracking parameters as a JSON object, e.g. {"utm_source": "newsletter"}. |

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

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

---

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