Add a roster shift
Adds a shift to a site's roster as a draft, from one of the site's shift templates (GET /shifts), with its own start
and end when you give them. With no person_id it's an open shift. Staff see nothing until the site's roster is
published (POST /rosters/publish), as in the Console. Rosters themselves are part of Growth and up
(plan_required otherwise).
Scope: attendance:manage · Plan: Pro and Enterprise in live mode; every plan in test mode.
AuthorizationBearer <token>Send Authorization: Bearer <token> on every request. The token is one of:
| Prefix | What it is | Where it may be used |
|---|---|---|
agoo_sk_live_ | Secret key, live mode | Your servers only |
agoo_sk_test_ | Secret key, test mode | Your servers only |
agoo_pk_live_ | Publishable key, live mode | Browsers 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 mode | As 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: attendance:manage
Idempotency-Key*stringA UUID you generate for this operation. If you retry with the same key within 24 hours, Agoo returns the
original response instead of acting twice. While the first request is still running, a retry returns
conflict. Reusing a key with a different request returns idempotency_key_reused. Responses with
rate_limited, internal_error or unavailable aren't stored, so retry those with the same key.
uuidapplication/json- body
site_id*SiteIdA site ID (TypeID with the site prefix).
^site_[0-7][0-9a-hjkmnp-tv-z]{25}$"site_01kjpt3yw0fz0v414608h9x65s"person_id?|Who works it; left out or null: an open shift.
on_date*stringdateshift_id*ShiftIdA shift ID (TypeID with the shift prefix).
^shift_[0-7][0-9a-hjkmnp-tv-z]{25}$"shift_01kn6pqfm0fmasbh61jnr3syze"starts_at?stringIts own start, instead of the template's.
date-timeends_at?stringIts own end: after the start, within 24 hours.
date-timenote?stringShown to the person with the shift.
length <= 280The shift, as a draft.
application/json- response
A shift on a site's roster. A published shift with a change waiting shows its published values.
id*RosterShiftIdA roster shift ID (TypeID with the roster_shift prefix).
^roster_shift_[0-7][0-9a-hjkmnp-tv-z]{25}$"roster_shift_01m5dk4qexa6kwfsr9nhy4r7w5"site_id*SiteIdA site ID (TypeID with the site prefix).
^site_[0-7][0-9a-hjkmnp-tv-z]{25}$"site_01kjpt3yw0fz0v414608h9x65s"person_id*|Who works it; null for an open shift.
open*booleanNo one works it yet: once published, staff who can take it may ask for it.
on_date*stringThe local day it belongs to at its site (a night shift belongs to the evening it starts).
datestarts_at*stringdate-timeends_at*stringdate-timestart_time*stringLocal time at the site, HH:MM.
"20:00"end_time*stringLocal time at the site, HH:MM.
"08:00"shift_id*ShiftIdA shift ID (TypeID with the shift prefix).
^shift_[0-7][0-9a-hjkmnp-tv-z]{25}$"shift_01kn6pqfm0fmasbh61jnr3syze"name*string"Night gate"label*|"Main gate"colour*string"blue""teal""green""gold""amber""rose""violet""slate"break_kind*|Its break; null follows your organisation's standard day.
"none""paid""unpaid"nullbreak_minutes*integer|nullbreak_starts*|When the planned break starts, HH:MM.
note*|Shown to the person with the shift.
status*stringdraft: staff don't see it yet. cancelled: removed after it was published. removed: a draft taken off.
"draft""published""cancelled""removed"pending_change*booleanA change waits for the next publish.
removing*booleanIt will be removed at the next publish.
source*string"pattern""manual""import""swap""claim"published_at*|date-timecreated_at*stringdate-timeupdated_at*stringdate-timecurl -X POST 'https://api.agoo.ardent.africa/v1/roster-shifts' \ -H 'Idempotency-Key: 3f6b2a1e-8c4d-4f7a-9b2e-5d1c0a7e9f64' \ -H 'Content-Type: application/json' \ -d '{ "site_id": "site_01m5h0fsfjj4dax85mkb6z3djr", "person_id": "person_01m50j6prqtcmm8yjekp0am4ge", "on_date": "2026-11-04", "shift_id": "shift_01m5zwj3nby2d63x571ncmshhj"}'{ "id": "roster_shift_01m5dk4qexa6kwfsr9nhy4r7w5", "site_id": "site_01kjpt3yw0fz0v414608h9x65s", "person_id": "person_01kjsesxm0e4zbyvkr7bcfxbfg", "open": true, "on_date": "2019-08-24", "starts_at": "2019-08-24T14:15:22Z", "ends_at": "2019-08-24T14:15:22Z", "start_time": "20:00", "end_time": "08:00", "shift_id": "shift_01kn6pqfm0fmasbh61jnr3syze", "name": "Night gate", "label": "Main gate", "colour": "blue", "break_kind": "none", "break_minutes": 0, "break_starts": "string", "note": "string", "status": "draft", "pending_change": true, "removing": true, "source": "pattern", "published_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}List roster shifts GET
Returns roster shifts by day: drafts (not yet seen by staff), published shifts, and published shifts removed since (`cancelled`). Filter by site, person, open or not, state and days. A published shift with a change waiting for the next publish shows its published values and `pending_change: true`; one to be removed at the next publish shows `removing: true`. An open shift (`open: true`, `person_id` null) is one no one works yet: once published, staff who can take it may ask for it in Agoo Workspace. **Scope:** `attendance:read` · **Plan:** Pro and Enterprise in live mode; every plan in test mode.
Get a roster shift GET
Returns one roster shift. **Scope:** `attendance:read` · **Plan:** Pro and Enterprise in live mode; every plan in test mode.