Skip to content

Customer creation

POST
/v1/client
curl --request POST \
--url https://api-admin.billz.ai/v1/client \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'platform-id: 7d4a4c38-dd84-4902-b744-0488b80a4c01' \
--data '{ "chat_id": "some_chat_id", "date_of_birth": "2022-05-14", "first_name": "John", "gender": 1, "last_name": "Doe", "phone_number": "+998000000000" }'

Error codes: 400 — input validation error; 401, 403, 429, 500 — shared by all methods. Body formats and semantics: Response codes and errors.

platform-id
string
default: 7d4a4c38-dd84-4902-b744-0488b80a4c01

Platform identifier. A static value is used for integrations.

Media typeapplication/json
object
id
string
phone_number

Phone number; stored as the only element of the customer’s phone_numbers

string
first_name

Name

string
last_name

Last name

string
gender

Gender: 1 — male, 2 — female; any other value — not set

integer format: int32
date_of_birth

Format 2022-05-14

string
chat_id

Telegram chat_id

string
Example
{
"chat_id": "some_chat_id",
"date_of_birth": "2022-05-14",
"first_name": "John",
"gender": 1,
"last_name": "Doe",
"phone_number": "+998000000000"
}

Successful response

Media typeapplication/json
object
id

Identifier of the created customer

string format: uuid
Examplegenerated
{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}