Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

Create a customer service record

POST 
/customer_service_records

Create a new customer service record for the provided phone number.

Request

Body

required

    phone_number stringrequired

    Possible values: Value must match regular expression ^\+1\d{10}$

    A valid US phone number in E164 format.

    webhook_url string

    Callback URL to receive webhook notifications.

    additional_data

    object

    name string

    The name of the administrator of CSR.

    authorized_person_name string

    The name of the authorized person.

    pin string

    The PIN of the customer service record.

    account_number string

    The account number of the customer service record.

    customer_code string

    The customer code of the customer service record.

    address_line_1 string

    The first line of the address of the customer service record.

    city string

    The city of the customer service record.

    state string

    Possible values: <= 2 characters, Value must match regular expression ^[A-Z]{2}$

    The state of the customer service record.

    zip_code string

    Possible values: <= 5 characters, Value must match regular expression ^\d{5}$

    The zip code of the customer service record.

    billing_phone_number string

    Possible values: Value must match regular expression ^\+1\d{10}$

    The billing phone number of the customer service record.

Responses

201: Successful Response

401: The required authentication headers were either invalid or not included in the request.

403: You do not have permission to perform the requested action on the specified resource or resources.

422: Unprocessable entity. Check the 'detail' field in response for details.

500: An unexpected error occurred.

Callbacks

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"
}
}