Docs

Type a word or a question. Esc closes the search.

Sign in Start free

Create an on-call rotation

Stores the rotation name, members, handoff settings, time zone, and optional client scope.

POST https://app.upfour.io/v1/oncall-schedules
POST https://app.upfour.io/v1/oncall-schedules

A real request. Sending it changes data in your up4 account.

Authorization
AuthorizationA pls_ key. It stays in this browser tab. Needs oncall.write.
Body
More fields5
rotation_type daily hands off every day at handoff_time, weekly every week on handoff_day at handoff_time. custom currently behaves like weekly; there is no custom shift length yet. Required on PUT; POST defaults to weekly.

1 more field is only available in JSON.

Headers

Sent directly from your browser to https://app.upfour.io/v1. Mutating calls get an automatic Idempotency-Key when the field is empty.

Request
Responsenot sent yet
Fill in a key and press Send request (⌘↵).
The answer appears here.
scope oncall.write stable Idempotency-Key supported returns 201

Body

application/json required 7 fields

namestringrequired

Unique within the company.

In the app: Name
All other fields6 fields
client_iduuid · nullable
handoff_dayinteger

Weekday of the weekly handoff, 0 = Sunday to 6 = Saturday, in the schedule's time zone. Daily rotations ignore it. A value outside 0 to 6 is stored as 1 (Monday).

In the app: Handoff day
handoff_timestring

Time of day of the handoff as HH:MM or HH:MM:SS in the schedule's time zone; empty means 09:00:00.

In the app: Handoff time
member_idsuuid[]

User IDs of the company members in rotation order. On update they replace the current members.

In the app: Team members
rotation_typestring

daily hands off every day at handoff_time, weekly every week on handoff_day at handoff_time. custom currently behaves like weekly; there is no custom shift length yet. Required on PUT; POST defaults to weekly.

dailyweeklycustom
In the app: Rotation frequency
timezonestring

IANA time zone name; empty means UTC.

In the app: Timezone

Returns

A successful request returns 201 with application/json.

Response fields 1 top-level fields
FieldTypeDescription
data OnCallSchedule
OnCallSchedule · 28 fields
FieldTypeDescription
created_at string (date-time)
handoff_day integer Weekday of the weekly handoff, 0 = Sunday to 6 = Saturday.
handoff_time string HH:MM:SS in the schedule's time zone.
id uuid
members OnCallMember[] · nullable
Each item · 8 fields
FieldTypeDescription
created_at string (date-time)
id uuid
schedule_id uuid
sort_order integer
user_id uuid
email string
first_name string
last_name string
name string
organization_id uuid
rotation_type string one ofdailyweeklycustom
timezone string
updated_at string (date-time)
client_id uuid
current_oncall OnCallMember The person on call right now, an active override first; absent while nobody is.
OnCallMember · 8 fields
FieldTypeDescription
created_at string (date-time)
id uuid
schedule_id uuid
sort_order integer
user_id uuid
email string
first_name string
last_name string

Errors

Only the errors this operation can return. Every error uses the same envelope.

Status Code Meaning
400 bad_request The request is malformed or fails validation.
403 permission_denied The credentials do not permit this action.

Every call can also return unauthorized (401), rate_limit_exceeded (429) or internal_error (500 / 502). See Responses and errors.