# Create Account — PreciseFP

> Create a new account. See the documentation

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

## Description

Create a new account. [See the documentation](https://documenter.getpostman.com/view/6125750/UyrDEFnd#b6db56e1-2767-499e-9928-38c82f3bd3e6)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `accountType` | `string` | Yes | The type of account. CLIENT or PROSPECT. |
| `clientFirstName` | `string` | Yes | The first name of the client. |
| `clientLastName` | `string` | Yes | The last name of the client. |
| `clientEmail` | `string` | Yes | The email address of the client. |
| `clientPhoneCountry` | `string` | No | The 2 letter country code of the client. Eg. US. |
| `clientPhoneCode` | `string` | No | Country calling code of the client. Eg. +1 |
| `clientPhoneNumber` | `string` | No | Phone number of the client. Eg. 3213211212 |
| `coClientFirstName` | `string` | No | The first name of the co-client. |
| `coClientLastName` | `string` | No | The last name of the co-client. |
| `coClientEmail` | `string` | No | The email address of the co-client. |
| `coClientPhoneCountry` | `string` | No | 2 letter country code. Eg. US |
| `coClientPhoneCode` | `string` | No | Country calling code. Eg. +1 |
| `coClientPhoneNumber` | `string` | No | Phone number. Eg. 3213211212 |

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

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: "precisefp-create-account",
  arguments: {
    accountType: "Account Type",
    clientFirstName: "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: "precisefp-create-account",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    precisefp: { authProvisionId: "apn_xxxxxxx" },
    accountType: "Account Type",
    clientFirstName: "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": "precisefp-create-account",
    "configured_props": {
      "precisefp": { "authProvisionId": "apn_xxxxxxx" },
      "accountType": "Account Type",
      "clientFirstName": "First Name"
    }
  }'
```

---

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