# Create a new customer

**POST** `/customers`

Base URL: `https://api.triple-a.work/kyc-api/v1`

Create a new customer by providing their profile information. We recommend to provide as much information as possible to ensure accurate results and prevent false rejections.

## Authorization

- oauth2 (http, bearer)

## Body

Content type: `application/json`

- `name` (string, required)
  Name of the customer
- `gender` (string)
  Gender of the customer
- `country_code` (string)
  Country Code
- `email` (string<email>, required)
  Email of the customer
- `dob` (string<date>)
  Date of birth of the customer in format YYYY-MM-DD

Example:

```json
{
  "name": "John Doe",
  "gender": "Male",
  "country_code": "US",
  "email": "johndoe@example.com",
  "dob": "1992-10-10"
}
```

## Responses

### 201

New Customer successfully created

- `id` (string<uuid>)
  Unique ID for the Customer KYC record created
- `name` (string)
  Name of the Customer
- `email` (string<email>)
  Email of the customer
- `dob` (string<date>)
  Date of Birth of the customer
- `gender` (string)
  Gender of the Customer
- `country_code` (string)
  Country Code for the Country of Customer
- `kyc_status` (string)
  KYC status of the Customer after the details are inspected. `verified` or `blocked`
- `kyc_tier` (number)
  Tier of the customer set based on KYC details provided
- `retries_left` (integer)
- `poi` (object[])
  - `id` (string<uuid>, required)
  - `created_at` (string<date-time>, required)
  - `status` (string, required)
  - `declined_reason` (string)
- `transaction_limit` (string)
  Amount allowed in each transaction (in SGD)

Example:

```json
{
  "id": "9598bb1a-4ce8-485b-a093-387656560624",
  "name": "John Doe",
  "email": "johndoe@example.com",
  "dob": "1992-10-10",
  "gender": "Male",
  "country_code": "US",
  "kyc_status": "verified",
  "kyc_tier": 1,
  "retries_left": 2,
  "poi": [],
  "transaction_limit": "1500 SGD"
}
```

### 400

Invalid Input

- `message` (string)
- `errors` (object[])
  - `path` (string)
  - `message` (string)
  - `errorCode` (string)

Example:

```json
{
  "message": "error message about wrong data in request.body",
  "errors": [
    {
      "path": "parameter with error",
      "message": "description of error",
      "errorCode": "openapi validation error code"
    }
  ]
}
```

### 401

Invalid/Expired Access Token

- `message` (string)
- `errors` (object[])
  - `path` (string)
  - `message` (string)

Example:

```json
{
  "message": "unauthorized",
  "errors": [
    {
      "path": "string",
      "message": "unauthorized"
    }
  ]
}
```

### 409

A Customer with provided Email already exists

- `message` (string)

Example:

```json
{
  "message": "Already Exists"
}
```

### 500

Server Error

- `message` (string)

Example:

```json
{
  "message": "Internal Server Error"
}
```