Find cases with a hub key
List the cases in your hub, open or closed, search them by Tag ID or title, and find a case's ID from your own software.
In this article6 sections
This page covers the calls a hub key uses to find cases. Paths are under https://prd-api-app.caseactive.com/v1/<hub id>.
Calls
| Call | What it does |
|---|---|
GET /cases | Lists your hub's open or closed cases |
GET /cases/search | Searches cases by Tag ID or title |
GET /whoami | Reads your hub's settings, such as its case types and field pages |
GET /roles | Lists your hub's roles |
GET /stages | Lists your hub's stages |
GET /schemas | Reads your hub's case and user custom fields |
A hub key acts as your hub's Virtual AssistantVirtual Assistant An automated team member that posts welcome messages, check-ins and stage updates for the firm; its posts carry a Virtual Assistant badge., which is on every case, so these calls reach every case in your hub, the two sample cases included.
A hub key can't create a case: POST /cases answers 403 HostCreateCaseNotEnabledException. To create cases from your software, use a manage key; see Create and update cases with a manage key.
Listing cases
| Parameter | What it does | Required | Default |
|---|---|---|---|
status | 1 for open cases, 0 for closed | No | 1 |
limit | How many cases a page holds, up to 1000 | No | 20 |
start_key | The startKey from the previous page | No | First page |
curl "https://prd-api-app.caseactive.com/v1/ca-7e6d5c4b3a2f10/cases?status=1" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"data": {
"items": [
{
"case_id": "cc-1a2b3c4d5e6f70",
"case_ref_id": "ca-7e6d5c4b3a2f10::rear-end-2026",
"title": "Jane Sample auto accident",
"team": {
"cu-7e6d5c4b3a2f10": "role::bots",
"cu-4f1c2a9e8b7d60": "role::clients",
"cu-9d8c7b6a5f4e30": "role::staff"
}
}
],
"currentItemCount": 1,
"selfLink": "https://prd-api-app.caseactive.com/v1/ca-7e6d5c4b3a2f10/cases?status=1"
}
}
- Cases come in Tag IDTag ID A permanent label you give a case, such as rear-end-2026, also shown as Reference ID and used in imports. order, from Z to A, not by date.
case_ref_idis your hub's ID, two colons and the case's Tag ID.teammaps each person on the case to their roleRole A set of permissions that decides what someone can see and do on a case, such as staff or clients., with no names. For names, read the case's team; see Read and update case details with a hub key.- While more cases remain, the page also holds
nextLink, the next page's full address, andstartKey. CallnextLink, or sendstartKeyasstart_key, until a page comes back without them. - Cases being deleted are left out, so a page can hold fewer than
limitcases while more remain. Go bynextLink, not the count. - A case's title and status here can lag a change by a few seconds.
Searching cases
GET /cases/search matches your words anywhere in a case's Tag ID, and from the start of a word in its title, and allows small typos. It doesn't search descriptions.
| Parameter | What it does | Required | Default |
|---|---|---|---|
query | The words to look for. Send * for every case. | Yes | — |
status | 1 for open cases, 0 for closed | No | 1 |
limit | How many results a page holds, up to 250 | No | 20 |
page | Which page of results, from 1 | No | 1 |
sort_by | A number field and direction, such as created_on:desc. It takes created_on, date_opened, last_activity, updated_on, users_ct and case_status. | No | Best match first |
curl "https://prd-api-app.caseactive.com/v1/ca-7e6d5c4b3a2f10/cases/search?query=rear-end-2026" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"data": {
"found": 1,
"page": 1,
"hits": [
{
"document": {
"case_id": "cc-1a2b3c4d5e6f70",
"ref_id": "rear-end-2026",
"title": "Jane Sample auto accident",
"case_status": 1,
"case_type": "general",
"case_stage": "stage::20260927120000_8c1f0e2d3b4a59",
"date_opened": 1772668800,
"created_on": 1791043509,
"last_activity": 1791050112,
"users_ct": 3
}
}
],
"selfLink": "https://prd-api-app.caseactive.com/v1/ca-7e6d5c4b3a2f10/cases/search?query=rear-end-2026"
}
}
- Each hit's
documentholds the case's ID, bare Tag ID, title, status, case typeCase type A category for cases, such as general, used to aim automations at the right cases., stageStage A step a case moves through, such as Intake or Demand sent, which the firm names and describes and which shows on the case page., how many people are on it, and its dates as Unix seconds in UTC. foundis how many cases match. Page through them withpage; there's nonextLink.- A case is searchable within seconds of a change.
Finding a case by its Tag ID
There's no exact lookup by Tag ID. Search for it, then keep the hit whose document.ref_id is exactly your Tag ID, since a search also finds close matches such as rear-end-2025. Search with status=1, then status=0, to cover open and closed cases.
Once you have the case's ID, every call about the case uses it; see Read and update case details with a hub key.
Your hub's settings
| Call | What it answers |
|---|---|
GET /whoami | The key's user ID, your hub's name, its case types, which sections it has on, and host_default_schemas, its case and user field pages |
GET /roles | Every role, the Virtual Assistant's role::bots included, with role_id, name, description, color and reads_notes, whether the role can read notes |
GET /stages | Every stage, first to last, with stage_id, name, description and order |
GET /schemas | default_schemas, your hub's case and user custom field pages, each with its fields' keys, labels and types |
None of them pages: each answers everything at once.
If a call is refused
| Status | message | Why |
|---|---|---|
| 400 | SchemaFieldsException | A parameter is missing or invalid, such as an empty query or a status other than 0 or 1; errors names it |
| 400 | InvalidStartKeyException | The start_key came from another list |
| 400 | SearchParameterException | The search refused a parameter, such as sort_by on a text field or a limit over 250; reason says which |
| 403 | HostCreateCaseNotEnabledException | A hub key tried to create a case |
For the error body and the rest of the codes, see Handle API errors and status codes.