Publish a site's roster
Every draft and change waiting at the site reaches staff: drafts are published, changes applied, removals made. Each
person whose shifts still to come changed is told once, and staff who can take a new open shift hear of it. Refused
with conflict while two of someone's shifts would overlap at any site; a change to a published shift starting within
48 hours needs a note (validation_failed); nothing waiting is invalid_state. roster.published fires.
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"note?stringTold to everyone the publish changes something for. Needed when a published shift starting within 48 hours changes.
length <= 280The publication.
application/json- response
One publish of a site's roster.
id*RosterPublicationIdA roster publication ID (TypeID with the roster_pub prefix).
^roster_pub_[0-7][0-9a-hjkmnp-tv-z]{25}$"roster_pub_01m50eqx6yn6f3w6q5jgfsfdab"site_id*SiteIdA site ID (TypeID with the site prefix).
^site_[0-7][0-9a-hjkmnp-tv-z]{25}$"site_01kjpt3yw0fz0v414608h9x65s"published_at*stringdate-timeadded*integerchanged*integerremoved*integeropen*integerOpen shifts made available.
people*integerPeople whose shifts changed.
note*string|nullpublished_by*|Who published it; null when published through the API.
curl -X POST 'https://api.agoo.ardent.africa/v1/rosters/publish' \ -H 'Idempotency-Key: 3f6b2a1e-8c4d-4f7a-9b2e-5d1c0a7e9f64' \ -H 'Content-Type: application/json' \ -d '{ "site_id": "site_01m5h0fsfjj4dax85mkb6z3djr", "note": "November'\''s roster, with two open nights"}'{ "id": "roster_pub_01m50eqx6yn6f3w6q5jgfsfdab", "site_id": "site_01m5h0fsfjj4dax85mkb6z3djr", "published_at": "2026-10-15T08:30:00Z", "added": 14, "changed": 3, "removed": 1, "open": 2, "people": 6, "note": "November's roster, with two open nights", "published_by": null}Remove a roster shift DELETE
A draft goes at once (`status: removed`); a published shift is removed at the next publish (`removing: true`), and its person is told then. **Scope:** `attendance:manage` · **Plan:** Pro and Enterprise in live mode; every plan in test mode.
List shift swaps GET
Returns shift swaps, newest first: a published shift someone offered to a colleague (or to anyone who could take it), sometimes for one of the colleague's shifts in return, and where it stands: `offered`, `accepted` (taken, waiting for approval), `approved`, `declined`, `refused` (the colleague said no), `withdrawn`, `expired` (the shift started first) or `cancelled` (the shift changed). Filter by site, by a person in it, or by status. **Scope:** `attendance:read` · **Plan:** Pro and Enterprise in live mode; every plan in test mode.