Help center Rotation Webhook Events

Learn about the different webhook events available for rotations and their payload structures

This page describes the webhook events that are available for rotations in the Rotation.app platform. These events can be used to integrate Rotation.app with your existing tools and workflows.

Available Events

Currently, the following webhook events are supported:

rotation.oncall.changed

This event is triggered whenever there is a change in the on-call users for a rotation.

Event Details

  • Event Type: rotation.oncall.changed
  • Trigger: When the on-call users change (e.g., during shift changes or manual queue adjustments)

Payload Structure

{
  // The type of event that occurred
  event_type: 'rotation.oncall.changed';

  // ISO 8601 timestamp of when the event occurred
  event_time: string;

  // Unique identifier of the rotation
  rotation_id: string;

  // Name of the rotation
  rotation_name: string;

  // Array of user IDs who are currently on-call
  on_call_user_ids: string[];

  // Individual user IDs mapped by their position in the rotation
  // These fields are provided for convenience when working with
  // workflows that don't support arrays
  [key: `on_call_user_ids_${number}`]: string;
}

Example Payload

{
  "event_type": "rotation.oncall.changed",
  "event_time": "2025-01-01T09:00:00Z",
  "rotation_id": "rotation_abc123",
  "rotation_name": "Engineering On-Call",
  "on_call_user_ids": ["user_123", "user_456"],
  "on_call_user_ids_0": "user_123",
  "on_call_user_ids_1": "user_456"
}

Using Webhook Events

To start receiving these events, you’ll need to:

  1. Create a webhook for your rotation
  2. Configure your endpoint to handle the events
  3. Implement the necessary logic to process the payload

For more information about creating and managing webhooks, see our webhook creation guide.