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
curl https://acme.headoni.app/api/v1/departments \
  -H "Authorization: Bearer hd_your_secret_here"

Response

200
{
  "departments": [
    { "id": "1490200000000000001", "name": "Support", "isDefault": true, "isPublicToUsers": true },
    { "id": "1490200000000000002", "name": "Billing", "isDefault": false, "isPublicToUsers": false }
  ]
}

Errors

StatuserrorMeaning
401unauthenticatedMissing or invalid token.
403insufficient_scopeToken lacks tickets:read.