Endpoints
List ticket statuses
Read the agent's ticket statuses in every category, with how many tickets each holds
Every ticket status belongs to one of six fixed categories. Each category has a default status and can hold your own statuses from Settings › Helpdesk › Statuses. The get_helpdesk_page tool with "page": "statuses" returns them as that page shows them, in order, with a ticket count for each.
https://api.qwryai.com/public/v1/tools/get_helpdesk_pageAuthentication
Send your API key as Authorization: Bearer YOUR_API_KEY. The key needs Manage conversations and helpdesk. See Authentication.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
chatbotId | string | Yes | The agent's id, from list_agents. |
page | string | Yes | statuses. The same tool reads the other Helpdesk settings pages: members, teams, scheduling, triggers, automations, macros, ticket_reuse, translation, ai_draft and csat. |
Request example
curl -X POST 'https://api.qwryai.com/public/v1/tools/get_helpdesk_page' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"chatbotId": "YOUR_AGENT_ID", "page": "statuses"}'const response = await fetch("https://api.qwryai.com/public/v1/tools/get_helpdesk_page", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({ chatbotId: "YOUR_AGENT_ID", page: "statuses" }),
});
const { data } = await response.json();
const { statuses, ticketCounts } = data.settings;import requests
response = requests.post(
"https://api.qwryai.com/public/v1/tools/get_helpdesk_page",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"chatbotId": "YOUR_AGENT_ID", "page": "statuses"},
)
settings = response.json()["data"]["settings"]Response
{
"success": true,
"data": {
"page": "statuses",
"settings": {
"statuses": [
{ "id": "open", "category": "open", "name": "New", "customerName": "Submitted", "description": "", "isDefault": true, "archived": false },
{ "id": "in_progress", "category": "in_progress", "name": "On you", "customerName": "In progress", "description": "", "isDefault": true, "archived": false },
{ "id": "7c1d2e9a-4b6f-4f0e-9a43-2d5b8c1e6f70", "category": "in_progress", "name": "Waiting on courier", "customerName": "In progress", "description": "We've asked the carrier for an update.", "isDefault": false, "archived": false },
{ "id": "on_hold", "category": "on_hold", "name": "On hold", "customerName": "In progress", "description": "", "isDefault": true, "archived": false },
{ "id": "waiting_on_customer", "category": "waiting_on_customer", "name": "On customer", "customerName": "Waiting on you", "description": "", "isDefault": true, "archived": false },
{ "id": "resolved", "category": "resolved", "name": "Closed", "customerName": "Resolved", "description": "", "isDefault": true, "archived": false },
{ "id": "closed", "category": "closed", "name": "Cancelled", "customerName": "Closed", "description": "", "isDefault": true, "archived": false }
],
"ticketCounts": {
"open": 4,
"in_progress": 2,
"7c1d2e9a-4b6f-4f0e-9a43-2d5b8c1e6f70": 1,
"resolved": 12
}
}
}
}| Field | Type | Description |
|---|---|---|
statuses[].id | string | The status id. Each category's built-in status uses the category key as its id. |
statuses[].category | string | open, in_progress, on_hold, waiting_on_customer, resolved or closed. Tickets report this as their status. |
statuses[].name | string | The name your team sees. |
statuses[].customerName | string | The name customers see. |
statuses[].description | string | The status's description, or empty. |
statuses[].isDefault | boolean | true for the category's default status. Each category has exactly one. |
statuses[].archived | boolean | true once archived: no longer offered for tickets. |
ticketCounts | object | Tickets per status id. Statuses with no tickets are left out. |
The categories appear in Tickets under these names by default:
| Category | Team name | Customer name |
|---|---|---|
open | New | Submitted |
in_progress | On you | In progress |
on_hold | On hold | In progress |
waiting_on_customer | On customer | Waiting on you |
resolved | Closed | Resolved |
closed | Cancelled | Closed |
To add, rename or archive a status, use save_ticket_status; to reorder a category, reorder_ticket_statuses. Both need Change agent settings and return a review you apply. See Helpdesk.
Errors
| HTTP status | code | When |
|---|---|---|
| 400 | INVALID_ARGUMENTS | page is missing or isn't one of the page names. |
| 400 | CHATBOT_ID_REQUIRED | chatbotId is missing or isn't a valid agent id. |
| 403 | INSUFFICIENT_PERMISSION | The key doesn't hold Manage conversations and helpdesk. |
| 404 | CHATBOT_NOT_FOUND | No agent with that chatbotId in your workspace. |
See Error Handling for authentication and rate-limit errors.