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

# Sign Up

> Create a new user account with a device or email and password.

`POST /api/v1/auth/sign-up`

Register a new user. Supports two methods: mobile device registration (for wallet users) and email/password registration.

## Parameters

### Body

| Name   | Type     | Required | Description                                 |
| ------ | -------- | -------- | ------------------------------------------- |
| `type` | `enum`   | Yes      | `mobile-device` or `email-password`         |
| `data` | `object` | Yes      | Registration data — shape depends on `type` |

**When `type` is `mobile-device`:**

| Name                  | Type     | Required | Description                               |
| --------------------- | -------- | -------- | ----------------------------------------- |
| `data.installationId` | `string` | Yes      | Device installation ID, 32–128 characters |
| `data.password`       | `string` | Yes      | Device password, 32–256 characters        |
| `data.platform`       | `enum`   | Yes      | `ios` or `android`                        |
| `data.challenge`      | `string` | Yes      | Verification challenge, 48 characters     |
| `data.assertionToken` | `string` | Yes      | Assertion token, 1–10,240 characters      |
| `data.assertionKeyId` | `string` | No       | Optional key identifier, 32–64 characters |

**When `type` is `email-password`:**

| Name            | Type     | Required | Description                        |
| --------------- | -------- | -------- | ---------------------------------- |
| `data.email`    | `string` | Yes      | Email address, 3–128 characters    |
| `data.password` | `string` | Yes      | Account password, 8–256 characters |

## Request examples

### Mobile device sign-up

```shell theme={null}
curl --request POST 'https://payments.bleepay.com/api/v1/auth/sign-up' \
  --header 'Content-Type: application/json' \
  --data '{
    "type": "mobile-device",
    "data": {
      "installationId": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6",
      "password": "your-device-password-minimum-32-chars",
      "platform": "ios",
      "challenge": "abcdefghijklmnopqrstuvwxyz0123456789abcdefghij",
      "assertionToken": "eyJhbGciOiJSUzI1NiIs..."
    }
  }'
```

### Email sign-up

```shell theme={null}
curl --request POST 'https://payments.bleepay.com/api/v1/auth/sign-up' \
  --header 'Content-Type: application/json' \
  --data '{
    "type": "email-password",
    "data": {
      "email": "user@example.com",
      "password": "your-password"
    }
  }'
```

## Response

### Response schema

| Field       | Type     | Description                    |
| ----------- | -------- | ------------------------------ |
| `id`        | `string` | Unique user identifier         |
| `role`      | `string` | User role (`USER`, etc.)       |
| `createdAt` | `string` | ISO 8601 creation timestamp    |
| `updatedAt` | `string` | ISO 8601 last update timestamp |

### Example response

```json theme={null}
{
  "id": "usr_a1b2c3d4e5f6",
  "role": "USER",
  "createdAt": "2026-06-09T12:00:00.000Z",
  "updatedAt": "2026-06-09T12:00:00.000Z"
}
```

### Error responses

| Status | Code                | Description                                              |
| ------ | ------------------- | -------------------------------------------------------- |
| `400`  | `invalid_type`      | The `type` field is missing or unsupported               |
| `400`  | `validation_failed` | Required fields are missing or invalid                   |
| `409`  | `already_exists`    | A user with this installation ID or email already exists |
| `429`  | `rate_limit`        | Too many sign-up attempts                                |
