Webhooks

WorkSchedule > Schedule > Toggle archives

Subscription_type: work_schedule/schedule/toggle_archive

postWebhookWebhooks > WorkSchedule > Schedule > Toggle archives

Payload

idstring required

Identifier of the schedule

namestring required

Name of the schedule

archived_atstring

When the schedule was archived; null when the schedule is active

company_idstring required

Identifier of the company the schedule belongs to

created_atstring required

When the schedule was created

updated_atstring required

When the schedule was last updated

employee_idsstring[] required

Identifiers of the employees assigned to the schedule

Example payload

{
  "id": "1",
  "name": "Morning shift",
  "company_id": "1",
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-01-01T00:00:00.000Z",
  "employee_ids": [
    "1",
    "2"
  ],
  "periods": [
    {
      "id": 1,
      "schedule_id": 1,
      "default": false,
      "start_day": 15,
      "start_month": 12,
      "end_day": 31,
      "end_month": 12,
      "schedule_type": "flexible"
    }
  ]
}

Response

Return a 200 status to indicate that the data was received successfully

Changes

Webhooks have no change history: a webhook is keyed by its event name rather than a path and method, so no recorded change can name it.