Docs
API referencePeople and H R

List departments

Preview· P9
GET
/departments

Returns your organisation's departments by name, each with the department it sits under, its head, code, cost centre and how many active people are in it. Archived departments are left out unless you ask for them with archived=true. A person's department is the name of their department.

Scope: people:read · Plan: Pro and Enterprise in live mode; every plan in test mode.

Authorization

headerAuthorizationBearer <token>

Send Authorization: Bearer <token> on every request. The token is one of:

PrefixWhat it isWhere it may be used
agoo_sk_live_Secret key, live modeYour servers only
agoo_sk_test_Secret key, test modeYour servers only
agoo_pk_live_Publishable key, live modeBrowsers and apps: create pre-registrations and bookings, read public booking types (with their intake questions) and their free slots, read the visit types open for pre-registration with their public forms. Never lists people.
agoo_pk_test_Publishable key, test modeAs above, in test mode

Admins create keys in Console → Developers → API keys and choose each key's scopes. A key is shown once. Never put a secret key in a URL, a browser or a mobile app.

Scope: people:read

Query Parameters

archived?boolean

true: archived departments too.

Defaultfalse

Response Body

Your departments.

application/json
  1. response
data*array<>
next_cursor*|

Pass this as cursor to get the next page. null on the last page.

Example"b3BhcXVlLWN1cnNvcg"
has_more*boolean
curl -X GET 'https://api.agoohq.com/v1/departments'
{  "data": [    {      "id": "dept_01kjsd2v80e5q7m3c9x4ht6wfb",      "object": "department",      "name": "Operations",      "code": "OPS",      "parent_id": null,      "head_id": "person_01kjsf3c00ecxs9b3k1hw7wq2n",      "cost_centre": "CC-300",      "archived": false,      "people": 38,      "created_at": "2026-03-03T09:00:00Z",      "updated_at": "2026-10-12T08:40:00Z"    },    {      "id": "dept_01kjsd2v80e5q7m3c9x4ht6wfa",      "object": "department",      "name": "Treasury",      "code": "TRY",      "parent_id": "dept_01kjsd1qg0f2n8r5bz7ke3yc4d",      "head_id": "person_01kjsesxm0e4zbyvkr7bcfxbfg",      "cost_centre": "CC-210",      "archived": false,      "people": 14,      "created_at": "2026-03-03T09:00:00Z",      "updated_at": "2026-10-06T14:30:00Z"    }  ],  "next_cursor": null,  "has_more": false}