# Create Client — Credit Repair Cloud

> Create Client See the documentation.

- Key: `credit_repair_cloud-create-client`
- Type: Action (Write)
- Version: 0.0.2
- App: Credit Repair Cloud (`credit_repair_cloud`) — https://pipedream.com/apps/credit-repair-cloud.md
- This page (HTML): https://pipedream.com/apps/credit-repair-cloud/actions/create-client
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/credit_repair_cloud/actions/create-client/create-client.mjs

## Description

Create Client [See the documentation](https://app.creditrepaircloud.com/webapi/examples).

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `type` | `string` | Yes | The type of the user. |
| `firstname` | `string` | Yes | First name should be in string format. |
| `lastname` | `string` | Yes | Last name should be in string format. |
| `middlename` | `string` | No | Middle name should be in string format. |
| `suffix` | `string` | No | Suffix should be in string format. |
| `email` | `string` | No | Email should be in email format. |
| `phone_home` | `integer` | No | Home Phone should be in 10 digit number format. |
| `phone_work` | `integer` | No | Work Phone should be in 10 digit number format. |
| `phone_mobile` | `string` | No | Mobile Phone format should be in (999) 999-9999. |
| `street_address` | `string` | No | Street Address should be in string format. |
| `city` | `string` | No | City should be in string format. |
| `state` | `string` | No | State should be in abbreviations format. |
| `post_code` | `integer` | No | Post code should be in number format. |
| `ssno` | `integer` | No | Social Security no.should be in 4 digit number format. |
| `birth_date` | `string` | No | Birth date should be in in mm/dd/yyyy format. |
| `memo` | `string` | No | Memo should be in string format. |
| `previous_mailing_address` | `string` | No | Previous mailing address should be in string format. Previous mailing address (only if at current mailing address for less than 2 years) |
| `previous_city` | `string` | No | Previous City should be in string format. |
| `previous_state` | `string` | No | Previous State should be in abbreviations format. |
| `previous_zip` | `integer` | No | Previous zip should be in number format. |
| `client_assigned_to` | `string` | No | Name of team members with comma separator for assing team members to client. Note: Pls login and go to https://app.creditrepaircloud.com/mycompany/team and Copy team member name in xml |
| `client_portal_access` | `string` | No | Portal Access for client. Values should be on or off https://secureclientaccess.com. on = Client can access portal off = Client can not access portal |
| `client_userid` | `string` | No | Userid same as email Note: Only accepted if client_portal_access is on |
| `client_agreement` | `string` | No | Agreement name should be in alphanumeric string. Note: Pls login and go to https://app.creditrepaircloud.com/mycompany/agreement and Copy agreement name in xml. Note: Only accepted if client_portal_access is on |
| `send_setup_password_info_via_email` | `string` | No | Syes = System will send login information via email and instructions for setting password to client. no = System will not send login information via email and instructions for setting password to client. Note: Only accepted if client_portal_access is on |
| `referred_by_firstname` | `string` | No | Referred by first name should be in string format. |
| `referred_by_lastname` | `string` | No | Referred by last name should be in string format. |
| `referred_by_email` | `string` | No | Email should be in email format. |

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

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

---

- App: https://pipedream.com/apps/credit-repair-cloud.md · All apps: https://pipedream.com/apps
