Skip to content
Cases
Manage case records in the Kayse AI system.
Create a New Case
POST/v1/cases
Request Body Fields
| Field | Required | Type | Description |
|---|---|---|---|
case_number | true | String | Unique case identifier |
external_source | true | String | Source system identifier |
external_source_id | true | String | Unique ID from external source |
external_source_data | false | Object | Additional data as key-value pairs |
name | false | String | Case name/title |
court_name | false | String | Name of the court |
jurisdiction | false | String | Legal jurisdiction |
description | false | String | Case description |
status | true | String | Case status |
type | true | String | Case type |
is_obo | false | Boolean | On behalf of another party |
created_date | false | Date | Case creation date |
court_date | false | Date | Next court date |
end_date | false | Date | Case end date |
client_ids | false | Array | Associated client IDs |
opt_out_voice_calls | false | Boolean | Opt out linked clients |
Request
bash
curl -X POST 'https://public-api.kayse.ai/v1/cases' \
-H 'X-API-KEY: your_api_key' \
-H 'Content-Type: application/json' \
-d '{
"case_number": "CASE-2024-001",
"external_source": "other",
"external_source_id": "ext_case_123",
"name": "Smith vs. Johnson",
"status": "active",
"type": "civil",
"client_ids": [123, 456]
}'Response
json
{
"id": 456,
"case_number": "CASE-2024-001",
"external_source": "other",
"external_source_id": "ext_case_123",
"name": "Smith vs. Johnson",
"status": "active",
"type": "civil",
"client_ids": [123, 456],
"origin": "public_api",
"update_origin": null
}Get a Case by ID
GET/v1/cases/{id}
URL Parameters
| Field | Required | Type | Description |
|---|---|---|---|
id | true | Integer | The unique identifier of the case |
Request
bash
curl -X GET 'https://public-api.kayse.ai/v1/cases/456' \
-H 'X-API-KEY: your_api_key'Response
json
{
"id": 456,
"case_number": "CASE-2024-001",
"name": "Smith vs. Johnson",
"status": "active",
"type": "civil",
"origin": "public_api",
"update_origin": null,
"call_opted_out": false,
"sms_opted_out": false,
"email_opted_out": false
}Opt-Out Status Fields
Case responses include call_opted_out, sms_opted_out, and email_opted_out to indicate whether all clients on the case have opted out of that channel. Use these fields to filter or exclude cases in integrations and outreach workflows.
Update a Case
PUT/v1/cases/{id}
Important
This is a PUT endpoint (NOT PATCH). All optional fields that are omitted will be set to null.
Request
bash
curl -X PUT 'https://public-api.kayse.ai/v1/cases/456' \
-H 'X-API-KEY: your_api_key' \
-H 'Content-Type: application/json' \
-d '{
"case_number": "CASE-2024-001",
"external_source": "other",
"external_source_id": "ext_case_123",
"status": "closed",
"type": "civil"
}'Response
json
{
"id": 456,
"case_number": "CASE-2024-001",
"status": "closed",
"type": "civil",
"origin": "public_api",
"update_origin": "public_api"
}Delete a Case
DELETE/v1/cases/{id}
URL Parameters
| Field | Required | Type | Description |
|---|---|---|---|
id | true | Integer | The unique identifier of the case |
Request
bash
curl -X DELETE 'https://public-api.kayse.ai/v1/cases/456' \
-H 'X-API-KEY: your_api_key'Response
json
{
"message": "case deleted successfully"
}Bulk Upsert Cases
POST/v1/cases/bulk
Each object follows the create schema. When id is omitted the case is created; when provided it's updated.
Request
bash
curl -X POST 'https://public-api.kayse.ai/v1/cases/bulk' \
-H 'X-API-KEY: your_api_key' \
-H 'Content-Type: application/json' \
-d '{
"cases": [
{
"case_number": "CASE-2024-001",
"external_source": "other",
"external_source_id": "ext-001",
"status": "open",
"type": "civil"
}
]
}'Bulk Delete Cases
POST/v1/cases/bulk_delete
Request Body Fields
| Field | Required | Type | Description |
|---|---|---|---|
ids | true | Array | Case IDs to delete (max 500) |
with_clients | false | Boolean | Also delete exclusively linked clients |
Request
bash
curl -X POST 'https://public-api.kayse.ai/v1/cases/bulk_delete' \
-H 'X-API-KEY: your_api_key' \
-H 'Content-Type: application/json' \
-d '{
"ids": [456, 789],
"with_clients": false
}'Send SMS to Client + Case
POST/v1/cases/communication/sms
Request Body Fields
| Field | Required | Type | Description |
|---|---|---|---|
case_id | true | Integer | Unique case identifier |
client_id | true | Integer | Unique client identifier |
message | true | String | Message text (supports template variables) |
Request
bash
curl -X POST 'https://public-api.kayse.ai/v1/cases/communication/sms' \
-H 'X-API-KEY: your_api_key' \
-H 'Content-Type: application/json' \
-d '{
"case_id": 123,
"client_id": 456,
"message": "Hello {{first_name}}, update on your case."
}'Response
json
{
"message": "sms scheduled"
}Send Email to Client + Case
POST/v1/cases/communication/email
Request Body Fields
| Field | Required | Type | Description |
|---|---|---|---|
case_id | true | Integer | Unique case identifier |
client_id | true | Integer | Unique client identifier |
subject | true | String | Email subject |
message | true | String | Email body (supports template variables) |
Request
bash
curl -X POST 'https://public-api.kayse.ai/v1/cases/communication/email' \
-H 'X-API-KEY: your_api_key' \
-H 'Content-Type: application/json' \
-d '{
"case_id": 123,
"client_id": 456,
"subject": "Case Update",
"message": "Hello {{first_name}}, here is an update."
}'Response
json
{
"message": "email scheduled"
}