Create Customer
https://sandboxapi.onbrails.com/api/v1/customers/ (opens in a new tab)
Add a new customer to your account
Path Parameters
Parameter | type | Required |
---|---|---|
firstName | string | ❌ |
lastName | string | ❌ |
string | ✅ | |
phone | string | ❌ |
countryCode | string | ❌ |
Request
Customers/Create Customer [POST]
curl --request POST \
--url https://sandboxapi.onbrails.com/api/v1/customers/ \
--header 'Authorization: Bearer YOUR_SECRET_KEY' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"lastName": "Toms",
"firstName": "Moses",
"email": "tom@brails.com",
"phone": "080303300",
"countryCode": "233",
"blacklist": false
}
'
Responses
🟢 200 - Result example
{
"status": true,
"message": "Customer successfully added",
"data": {
"id": "a34241ed-a932-4023-9d00-a533fd5911fc",
"createdAt": "2023-07-12T16:31:09.306Z",
"updatedAt": "2023-07-12T16:31:09.306Z",
"firstName": "Moses",
"lastName": "Boms",
"email": "Boms@b.com",
"phone": "0803033030",
"countryCode": "233",
"blacklist": false
}
}