Schedule

Manage and get information related to a broadcaster's stream schedule.

View as markdown
Provide feedback for this page

Get Channel Stream Schedule

Gets the broadcaster's streaming schedule. You can get the entire schedule or specific segments of the schedule. Learn More

Endpoint

GEThttps://api.twitch.tv/helix/schedule

Authorization

Requires one of the following:

Query Parameters

  • broadcaster_idStringRequired
    The ID of the broadcaster that owns the streaming schedule you want to get.
  • idString

    The ID of the scheduled segment to return. To specify more than one segment, include the ID of each segment you want to get. For example, 'id=1234&id=5678'. You may specify a maximum of 100 IDs. The response omits IDs that don't match a segment.

    If you specify id, the request ignores the first and after query parameters, and the response doesn't include a cursor.

  • start_timeString
    The UTC date and time that identifies when in the broadcaster's schedule to start returning segments. The response includes the segments that end after this time, including a segment that's in progress. If not specified, the request uses the current UTC date and time. Specify the date and time in RFC3339 format (for example, '2022-09-01T00:00:00Z').
  • utc_offsetInteger
    Not supported.
  • firstInteger
    The maximum number of items to return per page in the response. The minimum page size is 1 item per page and the maximum is 25 items per page. The default is 20.
  • afterString
    The cursor used to get the next page of results. The Pagination object in the response contains the cursor's value. Read More

Response Body

  • dataObject
    The broadcaster's streaming schedule.
    Hide child attributesShow child attributes
    • data.segmentsObject[]
      The list of broadcasts in the broadcaster's streaming schedule.
      Hide child attributesShow child attributes
      • data.segments.idString
        An ID that identifies this broadcast segment.
      • data.segments.start_timeString
        The UTC date and time (in RFC3339 format) of when the broadcast starts.
      • data.segments.end_timeStringNullable
        The UTC date and time (in RFC3339 format) of when the broadcast ends. Is null if the segment doesn't have a duration.
      • data.segments.titleString
        The broadcast segment's title.
      • data.segments.canceled_untilString
        Indicates whether the broadcaster canceled this segment of a recurring broadcast. If the broadcaster canceled this segment, this field is set to the same value that's in the 'end_time' field; otherwise, it's set to null.
      • data.segments.categoryObject
        The type of content that the broadcaster plans to stream or null if not specified.
        Hide child attributesShow child attributes
        • data.segments.category.idString
          An ID that identifies the category that best represents the content that the broadcaster plans to stream. For example, the game's ID if the broadcaster will play a game or the Just Chatting ID if the broadcaster will host a talk show.
        • data.segments.category.nameString
          The name of the category. For example, the game's title if the broadcaster will playing a game or Just Chatting if the broadcaster will host a talk show.
      • data.segments.is_recurringBoolean
        A Boolean value that determines whether the broadcast is part of a recurring series that streams at the same time each week or is a one-time broadcast. Is true if the broadcast is part of a recurring series.
    • data.broadcaster_idString
      The ID of the broadcaster that owns the broadcast schedule.
    • data.broadcaster_nameString
      The broadcaster's display name.
    • data.broadcaster_loginString
      The broadcaster's login name.
    • data.vacationObject
      The dates when the broadcaster is on vacation and not streaming. Is set to null if vacation mode is not enabled.
      Hide child attributesShow child attributes
      • data.vacation.start_timeString
        The UTC date and time (in RFC3339 format) of when the broadcaster's vacation starts.
      • data.vacation.end_timeString
        The UTC date and time (in RFC3339 format) of when the broadcaster's vacation ends.
  • paginationObject
    The information used to page through a list of results. The object is empty if there are no more pages left to page through. Read more.
    Hide child attributesShow child attributes
    • pagination.cursorString
      The cursor used to get the next page of results. Set the request's after query parameter to this value.

Response Codes

200OK
Successfully retrieved the broadcaster's streaming schedule.
400Bad Request
  • The broadcaster_id query parameter is required.
  • The ID in the broadcaster_id query parameter is not valid.
  • The ID in the id query parameter is not valid.
  • The format of the date and time in the start_time query parameter is not valid.
  • The cursor specified in the after query parameter is not valid.
401Unauthorized
  • The Authorization header is required and must specify a valid app access token or user access token.
  • The access token is not valid.
  • The ID in the Client-Id header must match the Client ID in the access token.
404Not Found
  • The broadcaster has not created a streaming schedule.
  • The broadcaster's streaming schedule doesn't contain any broadcast segments.
Request Example
curl -X GET 'https://api.twitch.tv/helix/schedule?broadcaster_id=141981764' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Client-Id: YOUR_CLIENT_ID'
Response Example
{
  "data": {
    "segments": [
      {
        "id": "eyJzZWdtZW50SUQiOiJlNGFjYzcyNC0zNzFmLTQwMmMtODFjYS0yM2FkYTc5NzU5ZDQiLCJpc29ZZWFyIjoyMDIxLCJpc29XZWVrIjoyNn0=",
        "start_time": "2021-07-01T18:00:00Z",
        "end_time": "2021-07-01T19:00:00Z",
        "title": "TwitchDev Monthly Update // July 1, 2021",
        "canceled_until": null,
        "category": {
            "id": "509670",
            "name": "Science & Technology"
        },
        "is_recurring": false
      },
      ...
    ],
    "broadcaster_id": "141981764",
    "broadcaster_name": "TwitchDev",
    "broadcaster_login": "twitchdev",
    "vacation": null
  },
  "pagination": {}
}

Get Channel iCalendar

Gets the broadcaster's streaming schedule as an iCalendar.

Note

The Client-Id and Authorization headers are not required.

Endpoint

GEThttps://api.twitch.tv/helix/schedule/icalendar

Authorization

No authorization required.

Query Parameters

  • broadcaster_idStringRequired
    The ID of the broadcaster that owns the streaming schedule you want to get.

Response Codes

200OK
Successfully retrieved the broadcaster's schedule as an iCalendar.
400Bad Request
  • The broadcaster_id query parameter is required.
  • The ID in the broadcaster_id query parameter is not valid.
Request Example
curl -X GET 'https://api.twitch.tv/helix/schedule/icalendar?broadcaster_id=141981764'
Response Example
BEGIN:VCALENDAR
PRODID:-//twitch.tv//StreamSchedule//1.0
VERSION:2.0
CALSCALE:GREGORIAN
REFRESH-INTERVAL;VALUE=DURATION:PT6H
X-PUBLISHED-TTL:PT6H
NAME:TwitchDev
X-WR-CALNAME:TwitchDev
BEGIN:VEVENT
UID:e4acc724-371f-402c-81ca-23ada79759d4
DTSTAMP:20210323T040131Z
DTSTART;TZID=/America/New_York:20210701T140000
DTEND;TZID=/America/New_York:20210701T150000
SUMMARY:TwitchDev Monthly Update // July 1, 2021
DESCRIPTION:Science & Technology.
CATEGORIES:Science & Technology
END:VEVENT
END:VCALENDAR

Create Channel Stream Schedule Segment

Adds a single or recurring broadcast to the broadcaster's streaming schedule.

For information about scheduling broadcasts, see Stream Schedule.

Endpoint

POSThttps://api.twitch.tv/helix/schedule/segment

Authorization

Requires one of the following:

Query Parameters

  • broadcaster_idStringRequired
    The ID of the broadcaster that owns the schedule to add the broadcast segment to. This ID must match the user ID in the user access token.

Request Body

  • start_timeStringRequired
    The date and time that the broadcast segment starts. Specify the date and time in RFC3339 format (for example, 2021-07-01T18:00:00Z).
  • timezoneStringRequired
    The time zone where the broadcast takes place. Specify the time zone using IANA time zone databaseformat (for example, America/New_York).
  • durationIntegerRequired
    The length of time, in minutes, that the broadcast is scheduled to run. The duration must be in the range 30 through 1380 (23 hours).
  • is_recurringBoolean
    A Boolean value that determines whether the broadcast recurs weekly. Is true if the broadcast recurs weekly. The default is false. Only partners and affiliates may add non-recurring broadcasts.
  • category_idString
    The ID of the category that best represents the broadcast's content. To get the category ID, use the Search Categories endpoint.
  • titleString
    The broadcast's title. The title may contain a maximum of 140 characters.

Response Body

  • dataObject
    The broadcaster's streaming scheduled.
    Hide child attributesShow child attributes
    • data.segmentsObject[]
      A list that contains the single broadcast segment that you added.
      Hide child attributesShow child attributes
      • data.segments.idString
        An ID that identifies this broadcast segment.
      • data.segments.start_timeString
        The UTC date and time (in RFC3339 format) of when the broadcast starts.
      • data.segments.end_timeString
        The UTC date and time (in RFC3339 format) of when the broadcast ends.
      • data.segments.titleString
        The broadcast segment's title.
      • data.segments.canceled_untilString
        Indicates whether the broadcaster canceled this segment of a recurring broadcast. If the broadcaster canceled this segment, this field is set to the same value that's in the 'end_time' field; otherwise, it's set to null.
      • data.segments.categoryObject
        The type of content that the broadcaster plans to stream or null if not specified.
        Hide child attributesShow child attributes
        • data.segments.category.idString
          An ID that identifies the category that best represents the content that the broadcaster plans to stream. For example, the game's ID if the broadcaster will play a game or the Just Chatting ID if the broadcaster will host a talk show.
        • data.segments.category.nameString
          The name of the category. For example, the game's title if the broadcaster will play a game or Just Chatting if the broadcaster will host a talk show.
      • data.segments.is_recurringBoolean
        A Boolean value that determines whether the broadcast is part of a recurring series that streams at the same time each week or is a one-time broadcast. Is true if the broadcast is part of a recurring series.
    • data.broadcaster_idString
      The ID of the broadcaster that owns the broadcast schedule.
    • data.broadcaster_nameString
      The broadcaster's display name.
    • data.broadcaster_loginString
      The broadcaster's login name.
    • data.vacationObject
      The dates when the broadcaster is on vacation and not streaming. Is set to null if vacation mode is not enabled.
      Hide child attributesShow child attributes
      • data.vacation.start_timeString
        The UTC date and time (in RFC3339 format) of when the broadcaster's vacation starts.
      • data.vacation.end_timeString
        The UTC date and time (in RFC3339 format) of when the broadcaster's vacation ends.

Response Codes

200Ok
Successfully added the broadcast segment.
400Bad Request
  • The broadcaster_id query parameter is required.
  • The ID in the broadcaster_id query parameter is not valid.
  • The format of the date and time in the 'start_time' field is not valid.
  • The date and time in the 'start_time' field is in the past.
  • The value in the 'timezone' field is not valid.
  • The value in the 'duration' field is not valid.
  • The ID in the 'category_id' field is not valid.
  • The string in the 'title' field is too long.
  • The 'title' field failed AutoMod checks.
  • The broadcast segment overlaps another segment in the broadcaster's schedule.
  • The broadcaster's schedule already contains the maximum of 365 segments.
401Unauthorized
  • The ID in the broadcaster_id query parameter must match the user ID in the user access token.
  • The Authorization header is required and must contain a user access token.
  • The user access token must include the channel:manage:schedule scope.
  • The access token is not valid.
  • The ID in the Client-Id header must match the client ID in the access token.
403Forbidden
  • Only partners and affiliates may add non-recurring broadcast segments.
Request Example
curl -X POST 'https://api.twitch.tv/helix/schedule/segment?broadcaster_id=141981764' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Client-Id: YOUR_CLIENT_ID' \
  -H 'Content-Type: application/json' \
  -d '{"start_time":"2021-07-01T18:00:00Z","timezone":"America/New_York","is_recurring":false,"duration":60,"category_id":"509670","title":"TwitchDev Monthly Update // July 1, 2021"}'
Response Example
{
  "data": {
    "segments": [
      {
        "id": "eyJzZWdtZW50SUQiOiJlNGFjYzcyNC0zNzFmLTQwMmMtODFjYS0yM2FkYTc5NzU5ZDQiLCJpc29ZZWFyIjoyMDIxLCJpc29XZWVrIjoyNn0=",
        "start_time": "2021-07-01T18:00:00Z",
        "end_time": "2021-07-01T19:00:00Z",
        "title": "TwitchDev Monthly Update // July 1, 2021",
        "canceled_until": null,
        "category": {
          "id": "509670",
          "name": "Science & Technology"
        },
        "is_recurring": false
      }
    ],
    "broadcaster_id": "141981764",
    "broadcaster_name": "TwitchDev",
    "broadcaster_login": "twitchdev",
    "vacation": null
  }
}

Update Channel Stream Schedule Segment

Updates a scheduled broadcast segment. For recurring segments, updating a segment's title, category, duration, and timezone, changes all segments in the recurring schedule, not just the specified segment.

Endpoint

PATCHhttps://api.twitch.tv/helix/schedule/segment

Authorization

Requires one of the following:

Query Parameters

  • broadcaster_idStringRequired
    The ID of the broadcaster who owns the broadcast segment to update. This ID must match the user ID in the user access token.
  • idStringRequired
    The ID of the broadcast segment to update.

Request Body

  • start_timeString

    The date and time that the broadcast segment starts. Specify the date and time in RFC3339 format (for example, 2022-08-02T06:00:00Z).

    NOTE: Only partners and affiliates may update a broadcast's start time and only for non-recurring segments.

  • durationInteger
    The length of time, in minutes, that the broadcast is scheduled to run. The duration must be in the range 30 through 1380 (23 hours).
  • category_idString
    The ID of the category that best represents the broadcast's content. To get the category ID, use the Search Categories endpoint. To remove the segment's category, set this field to an empty string.
  • titleString
    The broadcast's title. The title may contain a maximum of 140 characters.
  • is_canceledBoolean

    A Boolean value that indicates whether the broadcast is canceled. Set to true to cancel the segment.

    NOTE: For recurring segments, the API cancels the first segment after the current UTC date and time and not the specified segment (unless the specified segment is the next segment after the current UTC date and time).

  • timezoneString
    The time zone where the broadcast takes place. Specify the time zone using IANA time zone database format (for example, America/New_York).

Response Body

  • dataObject
    The broadcaster's streaming scheduled.
    Hide child attributesShow child attributes
    • data.segmentsObject[]
      A list that contains the single broadcast segment that you updated.
      Hide child attributesShow child attributes
      • data.segments.idString
        An ID that identifies this broadcast segment.
      • data.segments.start_timeString
        The UTC date and time (in RFC3339 format) of when the broadcast starts.
      • data.segments.end_timeString
        The UTC date and time (in RFC3339 format) of when the broadcast ends.
      • data.segments.titleString
        The broadcast segment's title.
      • data.segments.canceled_untilString
        Indicates whether the broadcaster canceled this segment of a recurring broadcast. If the broadcaster canceled this segment, this field is set to the same value that's in the 'end_time' field; otherwise, it's set to null.
      • data.segments.categoryObject
        The type of content that the broadcaster plans to stream or null if not specified.
        Hide child attributesShow child attributes
        • data.segments.category.idString
          An ID that identifies the category that best represents the content that the broadcaster plans to stream. For example, the game's ID if the broadcaster will play a game or the Just Chatting ID if the broadcaster will host a talk show.
        • data.segments.category.nameString
          The name of the category. For example, the game's title if the broadcaster will play a game or Just Chatting if the broadcaster will host a talk show.
      • data.segments.is_recurringBoolean
        A Boolean value that determines whether the broadcast is part of a recurring series that streams at the same time each week or is a one-time broadcast. Is true if the broadcast is part of a recurring series.
    • data.broadcaster_idString
      The ID of the broadcaster that owns the broadcast schedule.
    • data.broadcaster_nameString
      The broadcaster's display name.
    • data.broadcaster_loginString
      The broadcaster's login name.
    • data.vacationObject
      The dates when the broadcaster is on vacation and not streaming. Is set to null if vacation mode is not enabled.
      Hide child attributesShow child attributes
      • data.vacation.start_timeString
        The UTC date and time (in RFC3339 format) of when the broadcaster's vacation starts.
      • data.vacation.end_timeString
        The UTC date and time (in RFC3339 format) of when the broadcaster's vacation ends.

Response Codes

200OK
Successfully updated the broadcast segment.
400Bad Request
  • The broadcaster_id query parameter is required.
  • The ID in the broadcaster_id query parameter is not valid.
  • The id query parameter is required.
  • The ID in the id query parameter is not valid.
  • The request body doesn't contain any fields to update.
  • The format of the date and time in the 'start_time' field is not valid.
  • The date and time in the 'start_time' field is in the past.
  • The 'start_time' field may not be set for a recurring segment.
  • The 'start_time' field may not be set for a non-recurring segment that has already started.
  • The value in the 'timezone' field is not valid.
  • The value in the 'duration' field is not valid.
  • The ID in the 'category_id' field is not valid.
  • The string in the 'title' field is too long.
  • The 'title' field failed AutoMod checks.
  • The updated broadcast segment overlaps another segment in the broadcaster's schedule.
401Unauthorized
  • The ID in the broadcaster_id query parameter must match the user ID in the user access token.
  • The Authorization header is required and must contain a user access token.
  • The user access token must include the channel:manage:schedule scope.
  • The access token is not valid.
  • The ID in the Client-Id header must match the client ID in the access token.
404Not Found
  • The specified broadcast segment was not found.
Request Example
curl -X PATCH 'https://api.twitch.tv/helix/schedule/segment?broadcaster_id=141981764&id=eyJzZWdtZW50SUQiOiJlNGFjYzcyNC0zNzFmLTQwMmMtODFjYS0yM2FkYTc5NzU5ZDQiLCJpc29ZZWFyIjoyMDIxLCJpc29XZWVrIjoyNn0' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Client-Id: YOUR_CLIENT_ID' \
  -H 'Content-Type: application/json' \
  -d '{"duration":120}'
Response Example
{
  "data": {
    "segments": [
      {
        "id": "eyJzZWdtZW50SUQiOiJlNGFjYzcyNC0zNzFmLTQwMmMtODFjYS0yM2FkYTc5NzU5ZDQiLCJpc29ZZWFyIjoyMDIxLCJpc29XZWVrIjoyNn0=",
        "start_time": "2021-07-01T18:00:00Z",
        "end_time": "2021-07-01T20:00:00Z",
        "title": "TwitchDev Monthly Update // July 1, 2021",
        "canceled_until": null,
        "category": {
          "id": "509670",
          "name": "Science & Technology"
        },
        "is_recurring": false
      }
    ],
    "broadcaster_id": "141981764",
    "broadcaster_name": "TwitchDev",
    "broadcaster_login": "twitchdev",
    "vacation": null
  }
}

Delete Channel Stream Schedule Segment

Removes a broadcast segment from the broadcaster's streaming schedule.

Note

For recurring segments, removing a segment removes all segments in the recurring schedule.

Endpoint

DELETEhttps://api.twitch.tv/helix/schedule/segment

Authorization

Requires one of the following:

Query Parameters

  • broadcaster_idStringRequired
    The ID of the broadcaster that owns the streaming schedule. This ID must match the user ID in the user access token.
  • idStringRequired
    The ID of the broadcast segment to remove.

Response Codes

204No Content
Successfully removed the broadcast segment.
400Bad Request
  • The broadcaster_id query parameter is required.
  • The ID in the broadcaster_id query parameter is not valid.
  • The id query parameter is required.
  • The ID in the id query parameter is not valid.
401Unauthorized
  • The ID in the broadcaster_id query parameter must match the user ID in the user access token.
  • The Authorization header is required and must contain a user access token.
  • The user access token must include the channel:manage:schedule scope.
  • The access token is not valid.
  • The ID in the Client-Id header must match the client ID in the OAuth token.
404Not Found
  • The broadcaster has not created a streaming schedule.
  • The specified broadcast segment was not found.
Request Example
curl -X DELETE 'https://api.twitch.tv/helix/schedule/segment?broadcaster_id=141981764&id=eyJzZWdtZW50SUQiOiI4Y2EwN2E2NC0xYTZkLTRjYWItYWE5Ni0xNjIyYzNjYWUzZDkiLCJpc29ZZWFyIjoyMDIxLCJpc29XZWVrIjoyMX0' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Client-Id: YOUR_CLIENT_ID'

Update Channel Stream Schedule

Updates the broadcaster's schedule settings, such as scheduling a vacation.

Endpoint

PATCHhttps://api.twitch.tv/helix/schedule/settings

Authorization

Requires one of the following:

Query Parameters

  • broadcaster_idStringRequired
    The ID of the broadcaster whose schedule settings you want to update. The ID must match the user ID in the user access token.
  • is_vacation_enabledBoolean
    A Boolean value that indicates whether the broadcaster has scheduled a vacation. Set to true to enable Vacation Mode and add vacation dates, or false to cancel a previously scheduled vacation. If you omit this parameter, the request ignores the other vacation parameters and doesn't change the schedule settings.
  • vacation_start_timeString
    The UTC date and time of when the broadcaster's vacation starts. Specify the date and time in RFC3339 format (for example, 2021-05-16T00:00:00Z). Required if is_vacation_enabled is true.
  • vacation_end_timeString
    The UTC date and time of when the broadcaster's vacation ends. Specify the date and time in RFC3339 format (for example, 2021-05-30T23:59:59Z). The vacation may end no more than 5 years in the future. Required if is_vacation_enabled is true.
  • timezoneString
    The time zone that the broadcaster broadcasts from. Specify the time zone using IANA time zone database format (for example, America/New_York). Required if is_vacation_enabled is true.

Response Codes

204No Content
Successfully updated the broadcaster's schedule settings.
400Bad Request
  • The broadcaster_id query parameter is required.
  • The ID in the broadcaster_id query parameter is not valid.
  • The vacation_start_time and vacation_end_time query parameters are required if is_vacation_enabled is true.
  • The timezone query parameter is required if is_vacation_enabled is true.
  • The format of the string in vacation_start_time is not valid.
  • The format of the string in vacation_end_time is not valid.
  • The date in vacation_end_time must be later than the date in vacation_start_time.
  • The date in vacation_end_time is more than 5 years in the future.
  • The time zone in timezone is not valid.
401Unauthorized
  • The ID in the broadcaster_id query parameter must match the user ID in the user access token.
  • The Authorization header is required and must contain a user access token.
  • The user access token must include the channel:manage:schedule scope.
  • The access token is not valid.
  • The ID in the Client-Id header must match the client ID in the access token.
404Not Found
  • The broadcaster's schedule was not found.
Request Example
curl -X PATCH 'https://api.twitch.tv/helix/schedule/settings?broadcaster_id=141981764&is_vacation_enabled=true&vacation_start_time=2021-05-16T00%3A00%3A00Z&vacation_end_time=2021-05-23T00%3A00%3A00Z&timezone=America%2FNew_York' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Client-Id: YOUR_CLIENT_ID'