Browse the docs ▾

Open shifts API

List shifts waiting to be filled and post new ones. GET /api/v1/open-shifts, POST /api/v1/open-shifts, POST /api/v1/open-shifts/{id}/cancel.

Generated from the app's endpoint listView as Markdown

3 operations. Each needs an API key with the permission shown; see API keys and permissions.

OperationPermission
GET /api/v1/open-shiftsschedule:read
POST /api/v1/open-shiftsschedule:write
POST /api/v1/open-shifts/{id}/cancelschedule:write

#GET /api/v1/open-shifts

Shifts waiting to be filled.

  • Permission: schedule:read
  • Returns: a page of records: { data, hasMore, nextCursor }, status 200

Query parameters (all optional)

NameDescription
statusopen, offered, reserved, filled, expired or cancelled. Default: open, offered, reserved.
fromEarliest start time: YYYY-MM-DD or an ISO-8601 time.
toLatest start time (not included): YYYY-MM-DD or an ISO-8601 time.
facilityIdOnly this site.
limitRows per page, 1 to 200. Default 50.
cursorThe nextCursor value from the previous page.

Fields in each record: id, facilityId, start, end, role, category, skill, severity, status, count, filledCount, source, createdAt

curl "https://app.staffedly.com/api/v1/open-shifts?limit=50" \
  -H "Authorization: Bearer $STAFFEDLY_API_KEY"

#POST /api/v1/open-shifts

Post a shift to be filled. Offers go out according to your Automation settings.

  • Permission: schedule:write
  • Returns: one record: { data }, status 201
  • Safe retry: send an Idempotency-Key header (8 to 128 characters); the same key with the same request returns the first answer again

Body fields (JSON; a field the API does not know is refused)

FieldDescription
facilityIdRequired.
startRequired. ISO-8601 time with a zone, in the future.
endRequired. At most 36 hours after start.
roleA role key or name. Default: your first role.
countHow many people are needed, 1 to 50. Default 1.
severitynormal (default), urgent or critical.
skillOnly offer to people with this skill.

Fields in each record: id, facilityId, start, end, role, category, skill, severity, status, count, filledCount, source, createdAt

curl -X POST "https://app.staffedly.com/api/v1/open-shifts" \
  -H "Authorization: Bearer $STAFFEDLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"facilityId":"<facilityId>","start":"2027-01-12T07:00:00-05:00","end":"2027-01-12T15:00:00-05:00"}'

#POST /api/v1/open-shifts/{id}/cancel

Withdraw a shift that is still open or on offer. Offer links close.

  • Permission: schedule:write
  • Returns: one record: { data }, status 201
  • Safe retry: send an Idempotency-Key header (8 to 128 characters); the same key with the same request returns the first answer again

Path

NameDescription
idThe record's id.

Body fields (JSON; a field the API does not know is refused)

FieldDescription
reasonRequired.
cancelReasonother (default) or facility_cancelled, which applies your late-cancel rule.

Fields in each record: id, facilityId, start, end, role, category, skill, severity, status, count, filledCount, source, createdAt

curl -X POST "https://app.staffedly.com/api/v1/open-shifts/<id>/cancel" \
  -H "Authorization: Bearer $STAFFEDLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"reason":"Extra room opened"}'

Something missing or wrong on this page? Email [email protected] or book a free call; our team sets up every new customer at no charge.