API Reference
The reference below covers every endpoint in the Cases API. Code examples are generated automatically; the live playground is disabled to prevent accidental writes to production from the docs site.
/api/v1/casesAuthorization
BearerAuth Pass an API key issued from the agentlyleads workspace settings.
Example: Authorization: Bearer alk_live_xxxxxxxxxxxx
In: header
Query Parameters
Filter to cases in this status.
Value in
- "NEW"
- "OPEN"
- "PENDING"
- "RESOLVED"
- "CLOSED"
Filter to cases at this severity.
Value in
- "LOW"
- "MEDIUM"
- "HIGH"
- "URGENT"
true returns only cases still being worked (NEW, OPEN, PENDING);
false returns only RESOLVED and CLOSED ones. Omit for both.
Filter to cases on this company.
Filter to cases raised by this contact.
Filter to cases held by this workspace user.
Only cases updated at or after this ISO 8601 datetime.
date-timePage size.
1 <= value <= 1000100The nextCursor value from the previous page.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/cases"{ "cases": [ { "id": "cmq2case0alk34567890", "number": 31, "subject": "Pallet arrived damaged", "description": "string", "status": "NEW", "severity": "LOW", "source": "MANUAL", "open": true, "ageMins": 4320, "overdue": true, "company": { "id": "cmq2comp0alk34567890", "name": "Acme Corp" }, "contact": { "id": "cmq2comp0alk34567890", "name": "Acme Corp" }, "assignee": { "id": "cmq2comp0alk34567890", "name": "Acme Corp" }, "threadKey": "string", "firstResponseAt": "2019-08-24T14:15:22Z", "resolvedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } ], "nextCursor": "string"}{ "error": "severity must be one of: LOW, MEDIUM, HIGH, URGENT."}{ "error": "Invalid or missing API key."}{ "error": "API key missing required scope: read:cases."}{ "error": "Rate limit exceeded."}/api/v1/cases/{id}Authorization
BearerAuth Pass an API key issued from the agentlyleads workspace settings.
Example: Authorization: Bearer alk_live_xxxxxxxxxxxx
In: header
Path Parameters
The agentlyleads case ID.
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/cases/string"{ "case": { "id": "cmq2case0alk34567890", "number": 31, "subject": "Pallet arrived damaged", "description": "string", "status": "NEW", "severity": "LOW", "source": "MANUAL", "open": true, "ageMins": 4320, "overdue": true, "company": { "id": "cmq2comp0alk34567890", "name": "Acme Corp" }, "contact": { "id": "cmq2comp0alk34567890", "name": "Acme Corp" }, "assignee": { "id": "cmq2comp0alk34567890", "name": "Acme Corp" }, "threadKey": "string", "firstResponseAt": "2019-08-24T14:15:22Z", "resolvedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }}{ "error": "Invalid or missing API key."}{ "error": "API key missing required scope: read:cases."}{ "error": "Case not found."}