Create customer
Creates a new customer. All fields are optional; a random token is generated when one isn't provided.
Body·
application/json
All fields optional.
- Type: stringcountry
ISO 3166-1 alpha-2 country code.
- Type: stringFormat: emailemail
- Type: stringname
- Type: stringphone
- Type: stringpostal
_code - Type: stringtoken
Optional custom token. A random one is generated if omitted.
Responses
- application/json
- application/json
Request Example for post/customers/
curl https://chat.landbot.io/v1/customers/ \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Token YOUR_CHANNEL_TOKEN' \
--data '{
"name": "Sam",
"phone": "34697882898",
"email": "sam@helloumi.com",
"postal_code": "46021",
"country": "GB",
"token": "SDFRL4TOMFTEWERY262NF"
}'
{
"success": true,
"customer": {
"id": 42,
"name": "Sam",
"phone": "34697882898",
"email": "sam@helloumi.com",
"postal_code": "46021",
"country": "GB",
"token": "SDFRL4TOMFTEWERY262NF"
}
}