---
title: "user"
method: POST
path: "/v2/user"
tags: ["User Management"]
---

# user

`POST /v2/user`

Create a user associated with the authorized merchant.

When creating a user, a `userId` is returned. This `userId` is required for referencing the user within the AeroPay system.

<details>
<summary><strong>Error Glossary</strong> (click to expand)</summary>

| Code | HTTP Status | Message |
|------|-------------|-------------|
| `AP006` | 401 | Client not authorized for this scope |
| `AP101` | 401 | No authenticated user |
| `AP102` | 200 | Unable to create user |
| `AP105` | 200 | Phone number missing area code |
| `AP106` | 200 | Improperly formatted phone number |
| `AP115` | 200 | Unsupported phone type |
| `AP118` | 200 | Name cannot contain numbers or special characters |
| `AP119` | 200 | Unsupported country code  -  US numbers only |
| `AP700` | 400 | Missing or invalid required parameter |

</details>

## Headers

- `Content-Type` string, required
- `authorization` string, required

## Request body

- UserRequest
  - `firstName` string, required — First name of user being created
  - `lastName` string, required — Last name of user being created
  - `phoneNumber` string, required — Phone number of user in international format (+11234567890). Landlines, VOIPs, or prepaid numbers are invalid.
  - `email` string, required — Email of user being created

## Response `200`

Success or Validation Failure (Unified 200)

- union
  - UserObject
    - `user` object
      - `id` string — The id of the user, in uuid format
      - `firstName` string — The user's first name
      - `lastName` string — The user's last name
      - `type` string — Type of user. (consumer, business)
      - `email` string, email — The user's email
      - `phoneNumber` string — The user's phone number
      - `createdDate` string, date-time — Date user was created
    - `mfaType` 'sms' | 'email' — The Multi-Factor Authentication type determined by the merchant's configuration.
  - 200failure
    - `error` object
      - `code` string
      - `message` string
      - `help` string — Support contact information

## Other responses

- `401` — Unauthorized - Invalid or missing Merchant Token

---

[API](https://skmtc.net/aero/apis/aeropay-v2-api.md) · [All operations](https://skmtc.net/aero/apis/aeropay-v2-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aero/aeropay-v2-api/revisions/4700c4ceeaad/schema)
