Create a customer service record
POST/customer_service_records
Create a new customer service record for the provided phone number.
Request
- application/json
Body
required
Possible values: Value must match regular expression ^\+1\d{10}$
A valid US phone number in E164 format.
Callback URL to receive webhook notifications.
additional_data
object
The name of the administrator of CSR.
The name of the authorized person.
The PIN of the customer service record.
The account number of the customer service record.
The customer code of the customer service record.
The first line of the address of the customer service record.
The city of the customer service record.
Possible values: <= 2 characters
, Value must match regular expression ^[A-Z]{2}$
The state of the customer service record.
Possible values: <= 5 characters
, Value must match regular expression ^\d{5}$
The zip code of the customer service record.
Possible values: Value must match regular expression ^\+1\d{10}$
The billing phone number of the customer service record.
Responses
201: Successful Response
- application/json
401: The required authentication headers were either invalid or not included in the request.
- application/json
403: You do not have permission to perform the requested action on the specified resource or resources.
- application/json
422: Unprocessable entity. Check the 'detail' field in response for details.
- application/json
500: An unexpected error occurred.
- application/json
Request samples
curl -L 'https://apidev.telnyx.com/v2/customer_service_records' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"phone_number": "+1234567890",
"webhook_url": "https://example.com/webhook",
"additional_data": {
"name": "Entity Inc.",
"authorized_person_name": "John Doe",
"pin": "1234",
"account_number": "123456789",
"customer_code": "123456789",
"address_line_1": "123 Main St",
"city": "New York",
"state": "NY",
"zip_code": "10001",
"billing_phone_number": "+12065551212"
}
}'
Response samples
{
"data": {
"id": "db7cebdb-21a8-4e89-8f51-e03ba6b799bb",
"phone_number": "+2003271000",
"status": "pending",
"error_message": null,
"result": null,
"webhook_url": "https://example.com/webhook",
"created_at": "2023-01-01T00:00:00Z",
"updated_at": "2023-01-01T00:00:00Z"
}
}
{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "The required authentication headers were either invalid or not included in the request.",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10009"
}
}
]
}
{
"errors": [
{
"code": "10010",
"title": "Authorization failed",
"detail": "You do not have permission to perform the requested action on the specified resource or resources.",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10010"
}
}
]
}
{
"errors": [
{
"code": "10002",
"title": "Invalid phone number",
"detail": "The phone number is invalid.",
"source": {
"pointer": "/phone_numbers",
"parameter": "string"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10002"
}
}
]
}
{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occurred.",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10007"
}
}
]
}