Cases API
Cases¶
A case is a container for activities (ChatSessions).
The case resource has the following attributes.
| Attribute | Type | Editable | Description |
|---|---|---|---|
id |
UUID | read-only | The unique identifier |
organization_id |
UUID | read-only | ID of the organization who owns this case |
case_number |
string | required | Identifier for the case. Unique within the organization. |
contact_id |
UUID | optional | ID of the contact assigned to this case |
contact |
object | optional | The contact object assigned to this case |
owner_id |
UUID | optional | ID of the user who owns this case |
owner |
object | optional | The User who owns this case |
subject |
string | optional | A short, human-readable title summarizing the case |
description |
string | optional | A detailed description or summary of the case's context or issue |
status |
string | read-only | Status of this case. Can be Open, In Progress, Pending or Closed |
priority |
integer | required | Priority of this case. Can be 1: "None", 2: "Low", 3: "Normal", 4: "High", 5: "Critical" |
priority_label |
string | read-only | String representation of the priority of this case |
latest_messaging_channel |
string | optional | Latest messaging channel used in this case. Can be email, whatsapp, or webchat |
is_closed |
boolean | optional | Whether the case has been closed or not |
closed_at |
datetime | read-only | The timestamp indicating when the case was closed. Returns null if the case is still open |
is_waiting |
boolean | read-only | Indicates if the case is currently awaiting action or a response |
unread_message_count |
integer | read-only | Number of messages in this case not yet read by an agent |
created_at |
datetime | read-only | When the case was created |
updated_at |
datetime | read-only | When the case was updated |
created_by_user_id |
object | optional | ID of the user who created this case |
created_by_user |
object | optional | The User who created this case |
updated_by_user_id |
UUID | optional | ID of the user who last updated this case |
updated_by_user |
object | read-only | The User who last updated this case |
case_funnel_stage |
object | optional | The funnel stage object the case currently sits in |
case_funnel_stage_id |
UUID | optional | ID of the funnel stage assigned to this case |
channel_priority |
integer | optional | Used for routing. Each channel has it's predefined priority. Higher number = more urgent: telephony (4) > webchat (3) > whatsapp (2) > email (1). |
List external visitors cases¶
You can find out all cases that external visitor has within your organization. To learn more about external visitor identities, see External visitors.
GET /api/v5/orgs/<organization_id>/external-visitors/<external_id_jwt_token>/cases
This API endpoint returns a paginated collection of visitor cases. These are cases that belong to all contacts assigned to the same visitor.
Note: that the external_id_jwt_token is not a visitor ID but a JWT token that contains the external visitor's identity. The token must be signed with the organization's API signing key.
This endpoint takes the following GET-parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
ordering |
ordering | created_at |
Ordering of results with options created_at, -created_at or updated_at, -updated_at |
This endpoint returns:
- 200 if the request was successful
- 400 if there is a problem with the JWT token
- 401 if you are not authenticated
- 403 if you do not have active subscription
- 403 if you do not have access to the organization
- 404 if the visitor does not exist
Retrieve a single case¶
You can retrieve details of organization's owned chat:
GET /api/v5/orgs/<organization_id>/external-visitors/<external_id_jwt_token>/cases/<case_id>
This endpoint returns:
- 200 if the request was successful
- 400 if there is a problem with the JWT token
- 401 if you are not authenticated
- 403 if you do not have active subscription
- 403 if you do not have access to the organization
- 404 if the visitor does not exist