# Create Contact — Wealthbox

> Create a new contact in Wealthbox. For Person type, provide First Name and Last Name (both required). For Household, Organization, or Trust types, the Name field is used as the entity name (the API accepts a top-level name field for…

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

## Description

Create a new contact in Wealthbox. For `Person` type, provide First Name and Last Name (both required). For `Household`, `Organization`, or `Trust` types, the Name field is used as the entity name (the API accepts a top-level `name` field for non-Person types). Example: create a `Person` contact with first name `Jane`, last name `Smith`, email `jane@acme.com`; returns the contact object including `id`, `first_name`, `last_name`, `email_addresses`, `type`, and `contact_type`. [See the documentation](https://dev.wealthbox.com/#contacts-create-a-new-contact-post)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `firstName` | `string` | Yes | For Person type: the contact’s first name. For Household, Organization, or Trust types: the full entity name (e.g. Smith Family Household). This field maps to first_name for Person records and name for all other types. |
| `recordType` | `string` | No | Record type. One of Person, Household, Organization, or Trust. Defaults to Person when omitted. |
| `lastName` | `string` | No | The last name of the contact. Only applicable for Person type. |
| `email` | `string` | No | The primary email address of the contact. Sent to the Wealthbox API as the first entry in email_addresses. Example: jane@acme.com. |
| `phone` | `string` | No | The phone number of the contact |
| `company` | `string` | No | The name of the contact’s present company |
| `contactType` | `string` | No | The user-defined contact type category (e.g. Client, Prospect). Distinct from the record Type field above. Options are loaded from the connected account. |
| `type` | `string` | No | Deprecated alias for Contact Type, preserved for backwards compatibility with workflows configured before this prop was renamed. Prefer Contact Type for new configurations. 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": "wealthbox",
      },
    },
  },
)

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: "wealthbox-create-contact",
  arguments: {
    firstName: "First Name / Name",
    recordType: "Type",
  },
})
```

**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: "wealthbox-create-contact",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    wealthbox: { authProvisionId: "apn_xxxxxxx" },
    firstName: "First Name / Name",
    recordType: "Type",
  },
})

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": "wealthbox-create-contact",
    "configured_props": {
      "wealthbox": { "authProvisionId": "apn_xxxxxxx" },
      "firstName": "First Name / Name",
      "recordType": "Type"
    }
  }'
```

---

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