# Create Account — MX Technologies

> Creates a new account for a specific user. See the documentation

- Key: `mx_technologies-create-account`
- Type: Action (Write)
- Version: 0.0.2
- App: MX Technologies (`mx_technologies`) — https://pipedream.com/apps/mx-technologies.md
- This page (HTML): https://pipedream.com/apps/mx-technologies/actions/create-account
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/mx_technologies/actions/create-account/create-account.mjs

## Description

Creates a new account for a specific user. [See the documentation](https://docs.mx.com/api-reference/platform-api/reference/create-manual-account)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `userId` | `string` | Yes | The unique identifier for a user. Options are loaded from the connected account. |
| `accountType` | `string` | Yes | The general or parent type of the account. |
| `name` | `string` | Yes | The human-readable name for the account. |
| `apr` | `string` | No | The annual percentage rate associated with the account. |
| `apy` | `string` | No | The annual percentage yield associated with the account. |
| `availableBalance` | `string` | No | The balance that is available for use in asset accounts like checking and savings. PENDING transactions are typically taken into account with the available balance, but this may not always be the case. available_balance will usually be a positive value for all account types, determined in the same way as the balance field. |
| `balance` | `string` | No | The current balance of the account. PENDING transactions are typically not taken into account with the current balance, but this may not always be the case. This is the value used for the account balance displayed in MX UIs. The balance will usually be a positive value for all account types. Asset-type accounts (CHECKING, SAVINGS, INVESTMENT) may have a negative balance if they are in overdraft. Debt-type accounts (CREDIT_CARD, LOAN, LINE_OF_CREDIT, MORTGAGE) may have a negative balance if they are overpaid. |
| `cashSurrenderValue` | `string` | No | The sum of money paid to the policyholder or annuity holder in the event the policy is voluntarily terminated before it matures, or the insured event occurs. |
| `creditLimit` | `string` | No | The credit limit associated with the account. |
| `currencyCode` | `string` | No | The three-character ISO 4217 currency code. |
| `deathBenefit` | `integer` | No | The amount paid to the beneficiary of the account upon death of the account owner. |
| `interestRate` | `string` | No | The interest rate associated with the account. |
| `isClosed` | `boolean` | No | This indicates whether an account has been closed. |
| `isHidden` | `boolean` | No | This indicates whether the account is hidden. |
| `loanAmount` | `string` | No | The amount of the loan associated with the account. |
| `metadata` | `object` | No | Additional information a partner can store on the account. |
| `nickname` | `string` | No | An alternate name for the account. |
| `originalBalance` | `string` | No | The original balance associated with the 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": "mx_technologies",
      },
    },
  },
)

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

---

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