Docs

Publish a site's roster

Preview· P9
POST
/rosters/publish

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.

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: attendance:manage

Header Parameters

Idempotency-Key*string

A 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.

Formatuuid

Request Body

application/json
  1. body
site_id*SiteId

A site ID (TypeID with the site prefix).

Match^site_[0-7][0-9a-hjkmnp-tv-z]{25}$
Example"site_01kjpt3yw0fz0v414608h9x65s"
note?string

Told to everyone the publish changes something for. Needed when a published shift starting within 48 hours changes.

Lengthlength <= 280

Response Body

The publication.

application/json
  1. response

One publish of a site's roster.

id*RosterPublicationId

A roster publication ID (TypeID with the roster_pub prefix).

Match^roster_pub_[0-7][0-9a-hjkmnp-tv-z]{25}$
Example"roster_pub_01m50eqx6yn6f3w6q5jgfsfdab"
site_id*SiteId

A site ID (TypeID with the site prefix).

Match^site_[0-7][0-9a-hjkmnp-tv-z]{25}$
Example"site_01kjpt3yw0fz0v414608h9x65s"
published_at*string
Formatdate-time
added*integer
changed*integer
removed*integer
open*integer

Open shifts made available.

people*integer

People whose shifts changed.

note*string|null
published_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}