> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create User

> Use this endpoint to create a new user.

This endpoint creates a new user.

<Note>
  `external_user_guid` was not previously required in User create and the request will execute without it for backward compatibility, but it is required in all new implementations. The `external_user_guid` cannot begin with `USR-` as this is reserved for the system.
</Note>

Included in the response is the system-defined `master_widget_url`, `guid`, and `login_token` values.

### Query Parameters

<ParamField query="k" type="string" required>
  Your API key.
</ParamField>

<ParamField query="c" type="string" required>
  The client GUID or external client GUID.
</ParamField>

### Body Parameters

<ParamField body="external_user_guid" type="string" required>
  A unique identifier for the user within the client. Cannot begin with `USR-`.
</ParamField>

<ParamField body="email" type="string">
  The user's email address.
</ParamField>

<ParamField body="first_name" type="string">
  The user's first name.
</ParamField>

<ParamField body="last_name" type="string">
  The user's last name.
</ParamField>

<ParamField body="phone" type="string">
  The user's phone number.
</ParamField>

<ParamField body="zip_code" type="string">
  US Zip code in `nnnnn` or `nnnnn-nnnn` format, or a Canadian Postal Code in `ana nan` format.
</ParamField>

<ParamField body="sex" type="string">
  The user's sex. Accepted values: `MALE` or `FEMALE`.
</ParamField>

<ParamField body="birthdate" type="string">
  The user's date of birth in ISO 8601 format (e.g., `1992-03-28`).
</ParamField>

<RequestExample>
  ```json Request theme={null}
  {
    "external_user_guid": "GUID-1234",
    "email": "richard@email.com",
    "first_name": "Richard",
    "last_name": "Montague",
    "phone": "8015551234",
    "zip_code": "12345",
    "sex": "MALE"
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "guid": "USR-00dfffb5-62f6-9865-91f4-9d90f",
    "external_guid": "GUID-1234",
    "external_user_guid": "GUID-1234",
    "client_guid": "CLT-0858efd1-2d2e-6a5d-f2b5-c7dad42ef184",
    "email": "richard@email.com",
    "login_token": "cQQ380Ocyc049z6eRg--tz6Opshfxqz0T6rX2xaD2dwei5H...",
    "first_name": "Richard",
    "last_name": "Montague",
    "phone": "8015551234",
    "birthday": null,
    "sex": 0,
    "credit_score": null,
    "zip_code": 12345,
    "master_widget_url": "https://widgets.moneydesktop.com/raja/master?...",
    "accounts_widget_url": "https://widgets.moneydesktop.com/raja/accounts?...",
    "budgets_widget_url": "https://widgets.moneydesktop.com/raja/budgets?...",
    "debts_widget_url": "https://widgets.moneydesktop.com/raja/debts?...",
    "net_worth_widget_url": "https://widgets.moneydesktop.com/raja/net_worth?...",
    "spending_widget_url": "https://widgets.moneydesktop.com/raja/spending?...",
    "transactions_widget_url": "https://widgets.moneydesktop.com/raja/transactions?...",
    "status": {
      "status": 1,
      "name": "ENABLED",
      "message": ""
    }
  }
  ```
</ResponseExample>
