Docs
API referencePeople and H R

Get a department

Preview· P9
GET
/departments/{department_id}

Returns one department, archived or not.

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

Path Parameters

department_id*string

The department's ID.

Match^dept_[0-7][0-9a-hjkmnp-tv-z]{25}$
Example"dept_01kjsd2v80e5q7m3c9x4ht6wfa"

Response Body

The department.

application/json
  1. response

One of your organisation's departments. A person's department is the name of their department.

id*DepartmentId

A department ID (TypeID with the dept prefix).

Match^dept_[0-7][0-9a-hjkmnp-tv-z]{25}$
Example"dept_01kjsd2v80e5q7m3c9x4ht6wfa"
object*"department"
Value in"department"
name*string

Unique among the departments that aren't archived.

Length1 <= length <= 120
Example"Treasury"
code*|

Your own short code for it.

Lengthlength <= 20
Example"TRY"
parent_id*|

The department it sits under. null: at the top.

head_id*|

The person who heads it. null: no one is named.

cost_centre*|
Lengthlength <= 60
Example"CC-210"
archived*boolean

true for a department that's archived: kept, with its history, but not offered for new people.

people*integer

How many active people are in it.

Range0 <= value
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
curl -X GET 'https://api.agoohq.com/v1/departments/dept_01kjsd2v80e5q7m3c9x4ht6wfa'
{  "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"}