---
search:
  tags:
    - Customers
    - POST
seo:
  description: >-
    Create a customer. Reference for the POST /customers endpoint in the Apipay
    API.
sidebar:
  label: Create a customer
  badge: POST
title: Create a customer
type: openapi-operation
---
`POST /customers`

**Request body** (`application/json`, required)

- `name` (string, required)
- `email` (string<email>, required)
- `phone` (string)

Request body example:

```json
{
  "name": "Siti Aminah",
  "email": "siti@example.com",
  "phone": "+6281234567890"
}
```

**Responses**

- `201` — The created customer.
- `400` — The request was malformed or missing a required field.
- `401` — The API key is missing, invalid, or revoked.

Response example, 201:

```json
{
  "id": "cus_8f3a2b1c",
  "name": "Siti Aminah",
  "email": "siti@example.com",
  "phone": "+6281234567890",
  "created_at": "2019-08-24T14:15:22Z"
}
```
