Endpoints
List teams
Read the agent's Helpdesk teams, their members, assignment strategy and open ticket counts
Teams group the members who handle an agent's tickets and decide how new tickets are assigned to them. The get_helpdesk_page tool with "page": "teams" returns them as Settings › Helpdesk › Teams shows them. Every agent has a default team, General, from the first time its teams are read.
POST
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 | teams. Use members to read the members themselves, with their names, availability and teams. |
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": "teams"}'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: "teams" }),
});
const { data } = await response.json();
const teams = 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": "teams"},
)
teams = response.json()["data"]["settings"]Response
{
"success": true,
"data": {
"page": "teams",
"settings": [
{
"id": "3f9b6c2e-1a4d-4e8b-b7c5-0d2e6f8a9b10",
"name": "General",
"strategy": "round_robin",
"maxTicketsPerAgent": 15,
"workloadCategories": ["open", "in_progress"],
"unassignOnReply": false,
"isDefault": true,
"memberIds": ["<memberId>", "<memberId>"],
"lastAssignedId": "<memberId>",
"openTickets": 6,
"unassignedTickets": 2
}
]
}
}| Field | Type | Description |
|---|---|---|
id | string | The team's id. |
name | string | The team's name. |
strategy | string | How new tickets are assigned: manual (they wait until someone picks them up), round_robin (the next available member in turn) or balanced (the available member with the fewest open tickets). |
maxTicketsPerAgent | integer or null | Max tickets per agent: the workload limit for automatic assignment, or null for none. |
workloadCategories | array | Which status categories count toward a member's workload. |
unassignOnReply | boolean | Unassign on reply: when the customer writes and the assignee is offline, the ticket is unassigned so someone available picks it up. |
isDefault | boolean | true for the team new tickets go to by default. |
memberIds | array | The members in the team. Their names are on the members page. |
lastAssignedId | string or null | Round robin: the member who received the previous ticket. |
openTickets | integer | Open tickets in the team. |
unassignedTickets | integer | Of those, how many have no assignee. |
To add or change a team, use save_helpdesk_team; to choose a member's teams, set_member_teams. 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.