---
title: "Update On-Call schedule"
method: PUT
path: "/api/v2/on-call/schedules/{schedule_id}"
tags: ["On-Call"]
---

# Update On-Call schedule

`PUT /api/v2/on-call/schedules/{schedule_id}`

Update a new On-Call schedule

## Path parameters

- `schedule_id` string, required

## Query parameters

- `include` string

## Request body

- ScheduleUpdateRequest — A top-level wrapper for a schedule update request, referring to the `data` object with the new details.
  - `data` ScheduleUpdateRequestData, required — Contains all data needed to update an existing schedule, including its attributes (such as name and time zone) and any relationships to teams.
    - `attributes` ScheduleUpdateRequestDataAttributes, required — Defines the updatable attributes for a schedule, such as name, time zone, and layers.
      - `layers` ScheduleUpdateRequestDataAttributesLayersItems[], required — The updated list of layers (rotations) for this schedule.
        - `effective_date` string, date-time, required — When this updated layer takes effect (ISO 8601 format).
        - `end_date` string, date-time — When this updated layer should stop being active (ISO 8601 format).
        - `id` string — A unique identifier for the layer being updated.
        - `interval` LayerAttributesInterval, required — Defines how often the rotation repeats, using a combination of days and optional seconds. Should be at least 1 hour.
          - `days` integer — The number of days in each rotation cycle.
          - `seconds` integer — Any additional seconds for the rotation cycle (up to 30 days).
        - `members` ScheduleRequestDataAttributesLayersItemsMembersItems[], required — The members assigned to this layer.
          - `user` ScheduleRequestDataAttributesLayersItemsMembersItemsUser — Identifies the user participating in this layer as a single object with an `id`.
            - `id` string — The user's ID.
        - `name` string, required — The name for this layer (for example, "Secondary Coverage").
        - `restrictions` TimeRestriction[] — Any time restrictions that define when this layer is active.
          - `end_day` 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday' — A day of the week.
          - `end_time` string — Specifies the ending time for this restriction.
          - `start_day` 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday' — A day of the week.
          - `start_time` string — Specifies the starting time for this restriction.
        - `rotation_start` string, date-time, required — The date/time at which the rotation begins (ISO 8601 format).
        - `time_zone` string — The time zone for this layer.
      - `name` string, required — A short name for the schedule.
      - `time_zone` string, required — The time zone used when interpreting rotation times.
    - `id` string, required — The ID of the schedule to be updated.
    - `relationships` ScheduleUpdateRequestDataRelationships — Houses relationships for the schedule update, typically referencing teams.
      - `teams` DataRelationshipsTeams — Associates teams with this schedule in a data structure.
        - `data` DataRelationshipsTeamsDataItems[] — An array of team references for this schedule.
          - `id` string, required — The unique identifier of the team in this relationship.
          - `type` 'teams', required — Teams resource type.
    - `type` 'schedules', required — Schedules resource type.

## Response `200`

OK

- Schedule — Top-level container for a schedule object, including both the `data` payload and any related `included` resources (such as teams, layers, or members).
  - `data` ScheduleData — Represents the primary data object for a schedule, linking attributes and relationships.
    - `attributes` ScheduleDataAttributes — Provides core properties of a schedule object such as its name and time zone.
      - `name` string — A short name for the schedule.
      - `time_zone` string — The time zone in which this schedule operates.
    - `id` string — The schedule's unique identifier.
    - `relationships` ScheduleDataRelationships — Groups the relationships for a schedule object, referencing layers and teams.
      - `layers` ScheduleDataRelationshipsLayers — Associates layers with this schedule in a data structure.
        - `data` ScheduleDataRelationshipsLayersDataItems[] — An array of layer references for this schedule.
          - `id` string, required — The unique identifier of the layer in this relationship.
          - `type` 'layers', required — Layers resource type.
      - `teams` DataRelationshipsTeams — Associates teams with this schedule in a data structure.
        - `data` DataRelationshipsTeamsDataItems[] — An array of team references for this schedule.
          - `id` string, required — The unique identifier of the team in this relationship.
          - `type` 'teams', required — Teams resource type.
    - `type` 'schedules', required — Schedules resource type.
  - `included` ScheduleDataIncludedItem[] — Any additional resources related to this schedule, such as teams and layers.
    - union — Any additional resources related to this schedule, such as teams and layers.
      - TeamReference — Provides a reference to a team, including ID, type, and basic attributes/relationships.
        - `attributes` TeamReferenceAttributes — Encapsulates the basic attributes of a Team reference, such as name, handle, and an optional avatar or description.
          - `avatar` string — URL or reference for the team's avatar (if available).
          - `description` string — A short text describing the team.
          - `handle` string — A unique handle/slug for the team.
          - `name` string — The full, human-readable name of the team.
        - `id` string — The team's unique identifier.
        - `type` 'teams', required — Teams resource type.
      - Layer — Encapsulates a layer resource, holding attributes like rotation details, plus relationships to the members covering that layer.
        - `attributes` LayerAttributes — Describes key properties of a Layer, including rotation details, name, start/end times, and any restrictions.
          - `effective_date` string, date-time — When the layer becomes active (ISO 8601).
          - `end_date` string, date-time — When the layer ceases to be active (ISO 8601).
          - `interval` LayerAttributesInterval — Defines how often the rotation repeats, using a combination of days and optional seconds. Should be at least 1 hour.
            - `days` integer — The number of days in each rotation cycle.
            - `seconds` integer — Any additional seconds for the rotation cycle (up to 30 days).
          - `name` string — The name of this layer.
          - `restrictions` TimeRestriction[] — An optional list of time restrictions for when this layer is in effect.
            - `end_day` 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday' — A day of the week.
            - `end_time` string — Specifies the ending time for this restriction.
            - `start_day` 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday' — A day of the week.
            - `start_time` string — Specifies the starting time for this restriction.
          - `rotation_start` string, date-time — The date/time when the rotation starts (ISO 8601).
          - `time_zone` string — The time zone for this layer.
        - `id` string — A unique identifier for this layer.
        - `relationships` LayerRelationships — Holds references to objects related to the Layer entity, such as its members.
          - `members` LayerRelationshipsMembers — Holds an array of references to the members of a Layer, each containing member IDs.
            - `data` LayerRelationshipsMembersDataItems[] — The list of members who belong to this layer.
              - …
        - `type` 'layers', required — Layers resource type.
      - ScheduleMember — Represents a single member entry in a schedule, referencing a specific user.
        - `id` string — The unique identifier for this schedule member.
        - `relationships` ScheduleMemberRelationships — Defines relationships for a schedule member, primarily referencing a single user.
          - `user` ScheduleMemberRelationshipsUser — Wraps the user data reference for a schedule member.
            - `data` ScheduleMemberRelationshipsUserData, required — Points to the user data associated with this schedule member, including an ID and type.
              - …
        - `type` 'members', required — Schedule Members resource type.
      - ScheduleUser — Represents a user object in the context of a schedule, including their `id`, type, and basic attributes.
        - `attributes` ScheduleUserAttributes — Provides basic user information for a schedule, including a name and email address.
          - `email` string — The user's email address.
          - `name` string — The user's name.
          - `status` 'active' | 'deactivated' | 'pending' — The user's status.
        - `id` string — The unique user identifier.
        - `type` 'users', required — Users resource type.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `429` — Too many requests

---

[API](https://skmtc.net/datadog/apis/api-v2.md) · [All operations](https://skmtc.net/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v2/revisions/da68bf029e4c/schema)
