Skip to content
Clients
Manage client records in the Kayse AI system.
Create a New Client
POST/v1/clients
Request Body Fields
| Field | Required | Type | Description |
|---|---|---|---|
email | false | String | Client's email address |
mobile | false | String | Client's mobile phone number |
external_source | true | String | Source system identifier |
external_source_id | true | String | Unique identifier from external source |
first_name | true | String | Client's first name |
last_name | true | String | Client's last name |
date_of_birth | false | Date | Date of birth (YYYY-MM-DD) |
city | false | String | City of residence |
state | false | String | State of residence |
postal_code | false | String | Postal/ZIP code |
address_line1 | false | String | Primary address line |
address_line2 | false | String | Secondary address line |
voice_calls_opted_out | false | Boolean | Opt out of voice calls |
case_ids | false | Array | Associated case IDs |
Request
bash
curl -X POST 'https://public-api.kayse.ai/v1/clients' \
-H 'X-API-KEY: your_api_key' \
-H 'Content-Type: application/json' \
-d '{
"email": "john.doe@example.com",
"mobile": "+1234567890",
"external_source": "manual",
"external_source_id": "ext_123",
"first_name": "John",
"last_name": "Doe",
"city": "New York",
"state": "NY",
"case_ids": [12345, 67890]
}'Response
json
{
"id": 123,
"email": "john.doe@example.com",
"mobile": "+1234567890",
"external_source": "manual",
"external_source_id": "ext_123",
"first_name": "John",
"last_name": "Doe",
"city": "New York",
"state": "NY",
"voice_calls_opted_out": false,
"case_ids": [12345, 67890],
"origin": "public_api",
"update_origin": null
}Get a Client by ID
GET/v1/clients/{id}
URL Parameters
| Field | Required | Type | Description |
|---|---|---|---|
id | true | Integer | The unique identifier of the client |
Request
bash
curl -X GET 'https://public-api.kayse.ai/v1/clients/123' \
-H 'X-API-KEY: your_api_key'Response
json
{
"id": 123,
"email": "john.doe@example.com",
"mobile": "+1234567890",
"first_name": "John",
"last_name": "Doe",
"city": "New York",
"state": "NY",
"origin": "public_api",
"update_origin": null
}Update a Client
PUT/v1/clients/{id}
Note
This is a PUT endpoint, but only provided fields are updated. Required fields must still be included.
URL Parameters
| Field | Required | Type | Description |
|---|---|---|---|
id | true | Integer | The unique identifier of the client |
Request
bash
curl -X PUT 'https://public-api.kayse.ai/v1/clients/123' \
-H 'X-API-KEY: your_api_key' \
-H 'Content-Type: application/json' \
-d '{
"email": "john.updated@example.com",
"city": "Los Angeles",
"state": "CA"
}'Response
json
{
"id": 123,
"email": "john.updated@example.com",
"mobile": "+1234567890",
"first_name": "John",
"last_name": "Doe",
"city": "Los Angeles",
"state": "CA",
"origin": "public_api",
"update_origin": "public_api"
}Delete a Client
DELETE/v1/clients/{id}
URL Parameters
| Field | Required | Type | Description |
|---|---|---|---|
id | true | Integer | The unique identifier of the client |
Request
bash
curl -X DELETE 'https://public-api.kayse.ai/v1/clients/123' \
-H 'X-API-KEY: your_api_key'Response
json
{
"message": "client deleted successfully"
}Bulk Upsert Clients
POST/v1/clients/bulk
Each entry in the clients array follows the create schema when id is omitted. When id is provided, the entry is treated as a partial update.
Request Body Fields
| Field | Required | Type | Description |
|---|---|---|---|
clients | true | Array | Array of client payloads |
clients[].id | false | Integer | Client ID to update (omit to create) |
Request
bash
curl -X POST 'https://public-api.kayse.ai/v1/clients/bulk' \
-H 'X-API-KEY: your_api_key' \
-H 'Content-Type: application/json' \
-d '{
"clients": [
{
"external_source": "manual",
"external_source_id": "ext-901",
"first_name": "New",
"last_name": "Client"
},
{
"id": 123,
"voice_calls_opted_out": true
}
]
}'Response
json
{
"clients": [...],
"successful_ids": [999, 123],
"failed": []
}Bulk Delete Clients
POST/v1/clients/bulk_delete
Request Body Fields
| Field | Required | Type | Description |
|---|---|---|---|
client_ids | true | Array | Client IDs to delete |
force | false | Boolean | When true, performs a hard delete |
Request
bash
curl -X POST 'https://public-api.kayse.ai/v1/clients/bulk_delete' \
-H 'X-API-KEY: your_api_key' \
-H 'Content-Type: application/json' \
-d '{
"client_ids": [123, 456],
"force": false
}'Response
json
{
"deleted_ids": [123, 456]
}