Departments
List a desk's departments to discover routing ids.
List every department on the token's desk. Use this to find the departmentId
you pass to Create A Ticket. Private departments are
included: the public flag only gates the portal form, and an API caller may
route to any department.
Example
curl https://acme.headoni.app/api/v1/departments \
-H "Authorization: Bearer hd_your_secret_here"Response
{
"departments": [
{ "id": "1490200000000000001", "name": "Support", "isDefault": true, "isPublicToUsers": true },
{ "id": "1490200000000000002", "name": "Billing", "isDefault": false, "isPublicToUsers": false }
]
}Errors
| Status | error | Meaning |
|---|---|---|
| 401 | unauthenticated | Missing or invalid token. |
| 403 | insufficient_scope | Token lacks tickets:read. |