AurionAI Docs

On-Call Scheduling

Manage on-call schedules, rotations, and shift swaps via the Aurion API.

On-Call Scheduling

The On-Call API (v2) lets you manage on-call schedules for support teams. Define rotations, manage shift entries, and query who's currently on call.

List Schedules

cURL
curl "https://apps.aurionai.net/api/v2/oncall/schedules" \
  -H "X-API-Key: ak_live_xxxx"

Response:

{
  "data": [
    {
      "id": "sched_abc123",
      "name": "After-Hours Network Support",
      "team_id": "team_789",
      "timezone": "Europe/Brussels",
      "rotation_type": "weekly",
      "created_at": "2026-02-01T10:00:00Z"
    }
  ],
  "total": 3,
  "limit": 25,
  "offset": 0
}

Create Schedule

curl -X POST "https://apps.aurionai.net/api/v2/oncall/schedules" \
  -H "X-API-Key: ak_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Weekend Support",
    "team_id": "team_789",
    "timezone": "Europe/Brussels",
    "rotation_type": "weekly"
  }'

Get Schedule

curl "https://apps.aurionai.net/api/v2/oncall/schedules/sched_abc123" \
  -H "X-API-Key: ak_live_xxxx"

Update Schedule

curl -X PATCH "https://apps.aurionai.net/api/v2/oncall/schedules/sched_abc123" \
  -H "X-API-Key: ak_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "After-Hours Network Support (Updated)",
    "timezone": "Europe/Paris"
  }'

Delete Schedule

curl -X DELETE "https://apps.aurionai.net/api/v2/oncall/schedules/sched_abc123" \
  -H "X-API-Key: ak_live_xxxx"

Returns 204 No Content on success.

Schedule Entries

Entries are individual shifts within a schedule.

List Entries

curl "https://apps.aurionai.net/api/v2/oncall/schedules/sched_abc123/entries?start_date=2026-03-01&end_date=2026-03-31" \
  -H "X-API-Key: ak_live_xxxx"

Create Entry

curl -X POST "https://apps.aurionai.net/api/v2/oncall/schedules/sched_abc123/entries" \
  -H "X-API-Key: ak_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": "user_012",
    "start": "2026-03-15T18:00:00+01:00",
    "end": "2026-03-16T08:00:00+01:00"
  }'

Swap Entries

Swap shifts between two agents:

curl -X POST "https://apps.aurionai.net/api/v2/oncall/schedules/sched_abc123/entries/entry_456/swap" \
  -H "X-API-Key: ak_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "swap_with_user_id": "user_034"
  }'

Delete Entry

curl -X DELETE "https://apps.aurionai.net/api/v2/oncall/entries/entry_456" \
  -H "X-API-Key: ak_live_xxxx"

Returns 204 No Content on success.

Who's On Call Now?

Get the current on-call person for a team:

curl "https://apps.aurionai.net/api/v2/oncall/current/team_789" \
  -H "X-API-Key: ak_live_xxxx"

Response:

{
  "team_id": "team_789",
  "on_call": {
    "user_id": "user_012",
    "name": "Marie Laurent",
    "email": "marie@example.com",
    "shift_start": "2026-03-08T18:00:00+01:00",
    "shift_end": "2026-03-09T08:00:00+01:00"
  }
}

Rotation Types

TypeDescription
weeklyRotates on-call person every week
dailyRotates every day
customCustom rotation interval

Required Scopes

ScopeEndpoints
oncall:readGET /v2/oncall/schedules, GET /v2/oncall/schedules/:id, GET /v2/oncall/schedules/:id/entries, GET /v2/oncall/current/:team_id
oncall:writePOST /v2/oncall/schedules, PATCH /v2/oncall/schedules/:id, DELETE /v2/oncall/schedules/:id, POST /v2/oncall/schedules/:id/entries, DELETE /v2/oncall/entries/:id, POST /v2/oncall/entries/:id/swap

On this page