Skip to main content
POST
/
api
/
customers
Create a new customer
curl --request POST \
  --url https://api.example.com/api/customers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "company_id": 1,
  "CID": "<string>",
  "name": "<string>",
  "email": "<string>",
  "number_range_id": 1,
  "marketing_opt_in_at": "2023-11-07T05:31:56Z",
  "send_self_service_email": true
}
'
{
  "message": "<string>",
  "data": {
    "id": 123,
    "company_id": 123,
    "CID": "<string>",
    "name": "<string>",
    "email": "<string>",
    "number_range_id": 123,
    "marketing_opt_in_at": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Enter your JWT token in the format 'Bearer '

Body

application/json
company_id
integer
required
Example:

1

CID
string
required
name
string
required
email
string
number_range_id
integer
Example:

1

marketing_opt_in_at
string<date-time> | null

Datetime when the customer opted in to marketing. Null if not opted in.

send_self_service_email
boolean | null

Send the customer a notification with the self-service page URL

Example:

true

Response

201 - application/json

Customer created successfully

message
string
data
object