---
title: "Create a new customer"
method: POST
path: "/customers"
tags: ["Admin Customers"]
---

# Create a new customer

`POST /customers`

## Request

- Base URL: `http://localhost:8000/api/admin`
- URL: `http://localhost:8000/api/admin/customers`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bagisto/apis/bagisto-admin-api/docs/customers/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a new customer

## Request body

- object
  - `first_name` string, required
  - `last_name` string, required
  - `email` string, required
  - `phone` string, nullable
  - `gender` 'Male' | 'Female' | 'Other', nullable
  - `date_of_birth` string, nullable
  - `customer_group_id` integer, required
  - `channel_id` integer, nullable
  - `status` integer
  - `subscribed_to_news_letter` boolean, nullable
  - `send_password` boolean: When true, generate a random password and email credentials. When false, the explicit password field is required.
  - `password` string, nullable

## Response `201`

Customer created.

## Other responses

- `400`: Invalid input
- `422`: Validation failure.

---

[API](https://skmtc.dev/bagisto/apis/bagisto-admin-api.md) - [All operations](https://skmtc.dev/bagisto/apis/bagisto-admin-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bagisto/apis/bagisto-admin-api/revisions/3198f11be70f?raw)
