Duty Suite

Connect your own systems to Duty Suite.

Webhooks tell a system of yours the moment something happens — a roster published, a duty declined, time off decided, a clock-in. Each call is signed, retried, and carries ids only.

Start your free month Ask us a question

Set one up

  1. In Duty Suite, an owner or administrator opens Settings and finds Webhooks.
  2. Add an endpoint: an https:// address of yours, and the events it should hear about (none chosen means all of them).
  3. Copy the signing secret. It is shown once; you can make a new one at any time.
  4. Press Send a test. A ping arrives at your address, and the result shows under “What was sent”.

What your address receives

A POST with a JSON body and these headers:

  • X-DutySuite-Event — the event type, such as assignment.declined.
  • X-DutySuite-Delivery — the id of this delivery.
  • X-DutySuite-Signature — t=<unix seconds>,v1=<signature>, explained below.
{
  "id": "01a1d185-cb7d-70c1-ba6f-64675d343ad2",
  "type": "assignment.declined",
  "organizationId": "01a1d185-c7d0-732f-a529-81e29060519f",
  "occurredAt": "2026-11-12T17:05:25.902Z",
  "data": {
    "rosterId": "01a1d186-0007-70ed-8f5c-b9917c9ee518",
    "dutyId": "01a1d186-0026-7045-92d7-21d4c9292106",
    "assignmentId": "01a1d186-0047-751b-aaf6-a5fda049a5a7",
    "personId": "01a1d185-fef6-76d2-be27-abfc48d70251"
  }
}

The body carries ids, states and flags. Words people wrote — a reason for declining, a note — never leave Duty Suite this way.

Check the signature

The signature is the HMAC-SHA256, in hex, of the timestamp, a full stop and the body exactly as received, keyed with your endpoint’s signing secret. Compute it yourself and compare; refuse anything older than five minutes.

import { createHmac, timingSafeEqual } from 'node:crypto';

// rawBody: the bytes exactly as received — verify before parsing the JSON
export function isFromDutySuite(rawBody, signatureHeader, secret) {
  const parts = Object.fromEntries(signatureHeader.split(',').map((p) => p.split('=')));
  const t = Number(parts.t);
  if (!parts.v1 || Math.abs(Date.now() / 1000 - t) > 300) return false; // older than 5 minutes
  const want = createHmac('sha256', secret).update(`${t}.${rawBody}`).digest('hex');
  return want.length === parts.v1.length && timingSafeEqual(Buffer.from(want), Buffer.from(parts.v1));
}
import hashlib, hmac, time

def is_from_duty_suite(raw_body: bytes, signature_header: str, secret: str) -> bool:
    parts = dict(p.split("=", 1) for p in signature_header.split(","))
    t = int(parts.get("t", "0"))
    if "v1" not in parts or abs(time.time() - t) > 300:  # older than 5 minutes
        return False
    want = hmac.new(secret.encode(), f"{t}.".encode() + raw_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(want, parts["v1"])

Answer, retries and repeats

  • Answer with any 2xx within 10 seconds. Do the slow work after you have answered.
  • Anything else is tried again: after 30 seconds, then 1, 2, 4 and 8 minutes — six attempts in all.
  • The id in the body is the same on every attempt. Keep the ids you have handled and ignore repeats.
  • Events can arrive out of order. Use occurredAt if the order matters to you.
  • After 20 deliveries in a row have failed for good, the endpoint is paused. Start it again in Settings once your address is back.
  • What was sent is listed for 30 days, and any delivery can be sent again from there.
  • Redirects are not followed, and addresses on private networks are not called.

The events

TypeSent whenIn data
roster.publishedA roster is published, or published again after changes.rosterId, republish, version
roster.unpublishedA roster is taken back to a draft.rosterId
roster.changedA duty or an assignment changes on a roster.rosterId, published, change, dutyId, personIds
assignment.acknowledgedSomeone confirms a duty.rosterId, dutyId, assignmentId, personId
assignment.declinedSomeone declines a duty.rosterId, dutyId, assignmentId, personId
leave.requestedTime off is requested.leaveRequestId, personId, affectedDutyIds
leave.decidedTime off is approved or refused.leaveRequestId, personId, status, affectedDutyIds
leave.cancelledTime off is cancelled.leaveRequestId, personId, wasApproved
swap.changedA swap moves on: offered, taken, approved, refused, cancelled.swapId, transition
attendance.changedSomeone clocks in or out, or a time entry changes.personId, entryId, transition, rosterId, dutyId
person.changedA person’s status or positions change.personId, statusChanged, positionsChanged

Read the details with an API token

A webhook tells you what changed and whom it concerns, by id. To read the rest, an owner or administrator makes an API token under Settings → Integrations and picks what it may read. The secret starts with ds_ and is shown once; a token can be revoked at any time.

curl -H "Authorization: Bearer ds_your_token" \
  https://getdutyroster.com/api/v1/data/duties/01a1d186-0026-7045-92d7-21d4c9292106
RequestScopeAnswers
GET /data/rostersrosters.readRosters overlapping a window of days (from, to, status).
GET /data/rosters/{id}rosters.readOne roster with its duties and who is on them.
GET /data/duties/{id}rosters.readOne duty with who is on it.
GET /data/assignments/{id}rosters.readOne assignment: who, which duty, where it stands.
GET /data/swaps/{id}rosters.readOne swap: who offers what to whom, where it stands.
GET /data/peoplepeople.readThe people: names, email, employee number, positions, teams.
GET /data/people/{id}people.readOne person.
GET /data/leave-requestsleave.readTime off overlapping a window of days (from, to, status, personId).
GET /data/leave-requests/{id}leave.readOne request for time off.
GET /data/time-entriesattendance.readClock-ins starting in a window of days (from, to, personId).
GET /data/time-entries/{id}attendance.readOne time entry.
  • Every answer is { "data": … }. A token reads its own organization only; anything else is not found.
  • A window is given with both from and to (dates such as 2026-11-30) and can be 92 days at most. Without one, rosters and time off cover 45 days either side of today, clock-ins a week.
  • These requests only read. Reasons, notes, phone numbers and the place of a clock-in are never in an answer.
  • Organizations that use on call can also make tokens for a wallboard, a monitoring system that pages whoever is on call, and a team calendar.

Building something and stuck? Write to [email protected].