# Create end user (/data-api/api-reference/createEndUser)

Creates a new end user

## POST /v1/end-users

**Create end user**

Creates a new end user

**Tags:** end-users, public

### Request Body

**Content-Type:** `application/json` (required)

| Field | Type | Description |
|-------|------|-------------|
| `abn` | string | Australian Business Number (ABN) of the end user if they represent a business |
| `email` | string | An End Users email address. This should be their primary email, as it is used for notifying the End User about their consents. |
| `name` | string | Name of the end user |
| `phone` | string | An End Users Phone number in E.164 format |

**Example:**
```json
{
  "abn": "51 824 753 556",
  "email": "john_starmer@gmail.com",
  "name": "John Starmer",
  "phone": "+614123456789"
}
```

### Responses

**200:** OK response.

| Field | Type | Description |
|-------|------|-------------|
| `end_user_id` | string | A unique identifier for the End User object. |

**Example:**
```json
{
  "end_user_id": "83064af3-bb81-4514-a6d4-afba340825cd"
}
```

**400:** end_user_already_exists: user with that email already exists

| Field | Type | Description |
|-------|------|-------------|
| `fault` | boolean | Is the error a server-side fault? |
| `id` | string | ID is a unique identifier for this particular occurrence of the problem. |
| `message` | string | Message is a human-readable explanation specific to this occurrence of the problem. |
| `name` | string | Name is the name of this class of errors. |
| `temporary` | boolean | Is the error temporary? |
| `timeout` | boolean | Is the error a timeout? |

**401:** unauthorized: Unauthorized response.

| Field | Type | Description |
|-------|------|-------------|
| `fault` | boolean | Is the error a server-side fault? |
| `id` | string | ID is a unique identifier for this particular occurrence of the problem. |
| `message` | string | Message is a human-readable explanation specific to this occurrence of the problem. |
| `name` | string | Name is the name of this class of errors. |
| `temporary` | boolean | Is the error temporary? |
| `timeout` | boolean | Is the error a timeout? |

**403:** insufficient_scopes: token doesn't have enough scope to access the resource

| Field | Type | Description |
|-------|------|-------------|
| `fault` | boolean | Is the error a server-side fault? |
| `id` | string | ID is a unique identifier for this particular occurrence of the problem. |
| `message` | string | Message is a human-readable explanation specific to this occurrence of the problem. |
| `name` | string | Name is the name of this class of errors. |
| `temporary` | boolean | Is the error temporary? |
| `timeout` | boolean | Is the error a timeout? |

### Example Request
```bash
curl -X POST "https://api.fiskil.com/v1/end-users" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"abn":"51 824 753 556","email":"john_starmer@gmail.com","name":"John Starmer","phone":"+614123456789"}'
```