Skip to content

API and webhooks

Updated

In short: The Staffmio API lets another system read venues, people, published shifts, time records and time off, add draft shifts and send daily sales, with tokens an admin creates and scopes. Webhooks tell your system when the rota is published, a shift changes, time is approved, time off is decided or sales are imported, signed so you can trust them.

What moves, and which way

Plan
Pro plan and above
WhatDirection
Venues, departments and roles; people; published shifts; time records; time offOut of Staffmio
Draft shifts, which a manager publishes in StaffmioInto Staffmio
Net sales for whole daysInto Staffmio
Webhook events for people, the rota, shifts, time records, time off and salesOut of Staffmio

How to set it up

  1. An admin creates a token in Settings, Developer, with a name and the scopes it needs, and copies it once.
  2. Send it as a bearer token on every request.
  3. Read the OpenAPI description for the endpoints and fields.
  4. Add a webhook endpoint, choose its events and check the signature on each delivery.

Good to know

  • 120 requests a minute per token
  • Never returns pay, birthdays, addresses, emergency contacts, permissions or the kind of time off
  • Shifts added through the API are drafts until a manager publishes them

Safe by design

A token acts as the admin who made it, narrowed by its scopes, so every rule in the app applies to the API as well, and every write has a named person in the audit log. A token stops working when its admin stops being one.

Webhooks are signed with a secret only you and Staffmio know, and lost deliveries are retried.

Webhook events

  • Person added, changed or deactivated
  • Rota published
  • Published shift added, changed or removed
  • Time record approved
  • Time off decided
  • Sales imported

How Staffmio helps

Copying data between systems

Read the rota, time records and time off from another system through the API.

Team

Finding out about changes too late

Webhooks tell your system as soon as the rota is published or time is approved.

Rota

Sales from a till Staffmio does not connect to

Send each day’s net sales through the API.

Reports

Questions

Does Staffmio have an API?

Yes, a REST API with an OpenAPI description, tokens with scopes, and signed webhooks.

Can the API read pay rates?

No. Pay, birthdays, addresses, emergency contacts, permissions and the kind of time off are never returned.

Which plan includes the API?

The API and webhooks are part of the Pro plan.