# Schedule

## GET /v4/schedules

> List Schedules

```json
{"openapi":"3.1.0","info":{"title":"Squadcast","version":"1.0.0"},"tags":[{"name":"Schedule"}],"servers":[{"url":"https://api.squadcast.com","description":"production US env","variables":{}},{"url":"https://api.eu.squadcast.com","description":"production EU env","variables":{}}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"V4.ScheduleResponse":{"type":"object","allOf":[{"$ref":"#/components/schemas/V4.Schedule"}]},"V4.Schedule":{"type":"object","required":["id","name","description","orgID","teamID","timeZone","paused","ownerID","ownerType","tags","createdAt","updatedAt"],"properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"orgID":{"type":"string"},"teamID":{"type":"string"},"timeZone":{"type":"string"},"paused":{"type":"boolean"},"ownerID":{"type":"string"},"ownerType":{"type":"string","enum":["user","squad"]},"tags":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/V4.Tag"}},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}}},"V4.Tag":{"type":"object","required":["key","value","color"],"properties":{"key":{"type":"string"},"value":{"type":"string"},"color":{"type":"string"}}},"Common.V4.PageInfo":{"type":"object","required":["pageSize","hasNext","hasPrev"],"properties":{"pageSize":{"type":"integer","format":"int32"},"hasNext":{"type":"boolean"},"hasPrev":{"type":"boolean"},"nextCursor":{"type":"string"},"prevCursor":{"type":"string"}}},"Common.V4.Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message"]}}}}},"paths":{"/v4/schedules":{"get":{"operationId":"Schedules_listSchedules","summary":"List Schedules","parameters":[{"name":"teamID","in":"query","required":true,"schema":{"type":"string"},"explode":false},{"name":"scheduleIDs","in":"query","required":false,"schema":{"type":"array","items":{"type":"integer"}},"explode":false},{"name":"participants","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}},"explode":false},{"name":"scheduleName","in":"query","required":false,"schema":{"type":"string"},"explode":false},{"name":"myOnCall","in":"query","required":false,"schema":{"type":"boolean"},"explode":false},{"name":"youAndYourSquads","in":"query","required":false,"schema":{"type":"boolean"},"explode":false},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"explode":false},{"name":"hidePaused","in":"query","required":false,"schema":{"type":"boolean"},"explode":false},{"name":"ownerID","in":"query","required":false,"schema":{"type":"string"},"explode":false},{"name":"escalationPolicies","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}},"explode":false},{"name":"withoutEscalationPolicy","in":"query","required":false,"schema":{"type":"boolean"},"explode":false},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer"},"explode":false},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"explode":false}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/V4.ScheduleResponse"}},"pageInfo":{"$ref":"#/components/schemas/Common.V4.PageInfo"}}}}}},"400":{"description":"The server could not understand the request due to invalid syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"401":{"description":"Access is unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"402":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"403":{"description":"Access is forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"409":{"description":"The request conflicts with the current state of the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"422":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"502":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"503":{"description":"Service unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"504":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}}},"tags":["Schedule"]}}}}
```

## POST /v4/schedules

> Create Schedule

```json
{"openapi":"3.1.0","info":{"title":"Squadcast","version":"1.0.0"},"tags":[{"name":"Schedule"}],"servers":[{"url":"https://api.squadcast.com","description":"production US env","variables":{}},{"url":"https://api.eu.squadcast.com","description":"production EU env","variables":{}}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"V4.ScheduleResponse":{"type":"object","allOf":[{"$ref":"#/components/schemas/V4.Schedule"}]},"V4.Schedule":{"type":"object","required":["id","name","description","orgID","teamID","timeZone","paused","ownerID","ownerType","tags","createdAt","updatedAt"],"properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"orgID":{"type":"string"},"teamID":{"type":"string"},"timeZone":{"type":"string"},"paused":{"type":"boolean"},"ownerID":{"type":"string"},"ownerType":{"type":"string","enum":["user","squad"]},"tags":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/V4.Tag"}},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}}},"V4.Tag":{"type":"object","required":["key","value","color"],"properties":{"key":{"type":"string"},"value":{"type":"string"},"color":{"type":"string"}}},"Common.V4.Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message"]}}},"V4.CreateScheduleRequest":{"type":"object","required":["name","description","teamID","ownerID","ownerType","timeZone","tags"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"teamID":{"type":"string"},"ownerID":{"type":"string"},"ownerType":{"type":"string","enum":["user","squad"]},"timeZone":{"type":"string"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/V4.Tag"}}}}}},"paths":{"/v4/schedules":{"post":{"operationId":"Schedules_createSchedule","summary":"Create Schedule","parameters":[],"responses":{"201":{"description":"The request has succeeded and a new resource has been created as a result.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/V4.ScheduleResponse"}}}}}},"400":{"description":"The server could not understand the request due to invalid syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"401":{"description":"Access is unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"402":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"403":{"description":"Access is forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"409":{"description":"The request conflicts with the current state of the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"422":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"502":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"503":{"description":"Service unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"504":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}}},"tags":["Schedule"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V4.CreateScheduleRequest"}}}}}}}}
```

## GET /v4/schedules/{scheduleID}

> Get Schedule by ID

```json
{"openapi":"3.1.0","info":{"title":"Squadcast","version":"1.0.0"},"tags":[{"name":"Schedule"}],"servers":[{"url":"https://api.squadcast.com","description":"production US env","variables":{}},{"url":"https://api.eu.squadcast.com","description":"production EU env","variables":{}}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"V4.ScheduleResponse":{"type":"object","allOf":[{"$ref":"#/components/schemas/V4.Schedule"}]},"V4.Schedule":{"type":"object","required":["id","name","description","orgID","teamID","timeZone","paused","ownerID","ownerType","tags","createdAt","updatedAt"],"properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"orgID":{"type":"string"},"teamID":{"type":"string"},"timeZone":{"type":"string"},"paused":{"type":"boolean"},"ownerID":{"type":"string"},"ownerType":{"type":"string","enum":["user","squad"]},"tags":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/V4.Tag"}},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}}},"V4.Tag":{"type":"object","required":["key","value","color"],"properties":{"key":{"type":"string"},"value":{"type":"string"},"color":{"type":"string"}}},"Common.V4.Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message"]}}}}},"paths":{"/v4/schedules/{scheduleID}":{"get":{"operationId":"Schedules_getScheduleById","summary":"Get Schedule by ID","parameters":[{"name":"scheduleID","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/V4.ScheduleResponse"}}}}}},"400":{"description":"The server could not understand the request due to invalid syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"401":{"description":"Access is unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"402":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"403":{"description":"Access is forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"409":{"description":"The request conflicts with the current state of the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"422":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"502":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"503":{"description":"Service unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"504":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}}},"tags":["Schedule"]}}}}
```

## PUT /v4/schedules/{scheduleID}

> Update Schedule

```json
{"openapi":"3.1.0","info":{"title":"Squadcast","version":"1.0.0"},"tags":[{"name":"Schedule"}],"servers":[{"url":"https://api.squadcast.com","description":"production US env","variables":{}},{"url":"https://api.eu.squadcast.com","description":"production EU env","variables":{}}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"V4.ScheduleResponse":{"type":"object","allOf":[{"$ref":"#/components/schemas/V4.Schedule"}]},"V4.Schedule":{"type":"object","required":["id","name","description","orgID","teamID","timeZone","paused","ownerID","ownerType","tags","createdAt","updatedAt"],"properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"orgID":{"type":"string"},"teamID":{"type":"string"},"timeZone":{"type":"string"},"paused":{"type":"boolean"},"ownerID":{"type":"string"},"ownerType":{"type":"string","enum":["user","squad"]},"tags":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/V4.Tag"}},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}}},"V4.Tag":{"type":"object","required":["key","value","color"],"properties":{"key":{"type":"string"},"value":{"type":"string"},"color":{"type":"string"}}},"Common.V4.Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message"]}}},"V4.UpdateScheduleRequest":{"type":"object","required":["name","description","ownerID","ownerType","tags"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"ownerID":{"type":"string"},"ownerType":{"type":"string","enum":["user","squad"]},"tags":{"type":"array","items":{"$ref":"#/components/schemas/V4.Tag"}}}}}},"paths":{"/v4/schedules/{scheduleID}":{"put":{"operationId":"Schedules_updateSchedule","summary":"Update Schedule","parameters":[{"name":"scheduleID","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/V4.ScheduleResponse"}}}}}},"400":{"description":"The server could not understand the request due to invalid syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"401":{"description":"Access is unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"402":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"403":{"description":"Access is forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"409":{"description":"The request conflicts with the current state of the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"422":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"502":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"503":{"description":"Service unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"504":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}}},"tags":["Schedule"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V4.UpdateScheduleRequest"}}}}}}}}
```

## DELETE /v4/schedules/{scheduleID}

> Delete Schedule

```json
{"openapi":"3.1.0","info":{"title":"Squadcast","version":"1.0.0"},"tags":[{"name":"Schedule"}],"servers":[{"url":"https://api.squadcast.com","description":"production US env","variables":{}},{"url":"https://api.eu.squadcast.com","description":"production EU env","variables":{}}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Common.V4.Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message"]}}}}},"paths":{"/v4/schedules/{scheduleID}":{"delete":{"operationId":"Schedules_deleteSchedule","summary":"Delete Schedule","parameters":[{"name":"scheduleID","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. ","content":{"*/*":{"schema":{"type":"object"}}}},"400":{"description":"The server could not understand the request due to invalid syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"401":{"description":"Access is unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"402":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"403":{"description":"Access is forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"409":{"description":"The request conflicts with the current state of the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"422":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"502":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"503":{"description":"Service unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"504":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}}},"tags":["Schedule"]}}}}
```

## PATCH /v4/schedules/{scheduleID}/actions

> Pause/Resume Schedule

```json
{"openapi":"3.1.0","info":{"title":"Squadcast","version":"1.0.0"},"tags":[{"name":"Schedule"}],"servers":[{"url":"https://api.squadcast.com","description":"production US env","variables":{}},{"url":"https://api.eu.squadcast.com","description":"production EU env","variables":{}}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"V4.PauseResumeScheduleResponse":{"type":"object","required":["action","success"],"properties":{"action":{"type":"string"},"success":{"type":"boolean"}}},"Common.V4.Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message"]}}}}},"paths":{"/v4/schedules/{scheduleID}/actions":{"patch":{"operationId":"Schedules_pauseresumeSchedule","summary":"Pause/Resume Schedule","parameters":[{"name":"scheduleID","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/V4.PauseResumeScheduleResponse"}}}}}},"400":{"description":"The server could not understand the request due to invalid syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"401":{"description":"Access is unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"402":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"403":{"description":"Access is forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"409":{"description":"The request conflicts with the current state of the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"422":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"502":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"503":{"description":"Service unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"504":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}}},"tags":["Schedule"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["pause","resume"]}}}}}}}}}}
```

## PATCH /v4/schedules/{scheduleID}/change-timezone

> Change Timezone

```json
{"openapi":"3.1.0","info":{"title":"Squadcast","version":"1.0.0"},"tags":[{"name":"Schedule"}],"servers":[{"url":"https://api.squadcast.com","description":"production US env","variables":{}},{"url":"https://api.eu.squadcast.com","description":"production EU env","variables":{}}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"V4.ChangeTimezoneResponse":{"type":"object","required":["timeZone"],"properties":{"timeZone":{"type":"string"}}},"Common.V4.Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message"]}}}}},"paths":{"/v4/schedules/{scheduleID}/change-timezone":{"patch":{"operationId":"Schedules_changeTimezone","summary":"Change Timezone","parameters":[{"name":"scheduleID","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/V4.ChangeTimezoneResponse"}}}}}},"400":{"description":"The server could not understand the request due to invalid syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"401":{"description":"Access is unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"402":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"403":{"description":"Access is forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"409":{"description":"The request conflicts with the current state of the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"422":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"502":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"503":{"description":"Service unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"504":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}}},"tags":["Schedule"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"timeZone":{"type":"string"}}}}}}}}}}
```

## POST /v4/schedules/{scheduleID}/clone

> Clone Schedule

```json
{"openapi":"3.1.0","info":{"title":"Squadcast","version":"1.0.0"},"tags":[{"name":"Schedule"}],"servers":[{"url":"https://api.squadcast.com","description":"production US env","variables":{}},{"url":"https://api.eu.squadcast.com","description":"production EU env","variables":{}}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"V4.ScheduleResponse":{"type":"object","allOf":[{"$ref":"#/components/schemas/V4.Schedule"}]},"V4.Schedule":{"type":"object","required":["id","name","description","orgID","teamID","timeZone","paused","ownerID","ownerType","tags","createdAt","updatedAt"],"properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"orgID":{"type":"string"},"teamID":{"type":"string"},"timeZone":{"type":"string"},"paused":{"type":"boolean"},"ownerID":{"type":"string"},"ownerType":{"type":"string","enum":["user","squad"]},"tags":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/V4.Tag"}},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}}},"V4.Tag":{"type":"object","required":["key","value","color"],"properties":{"key":{"type":"string"},"value":{"type":"string"},"color":{"type":"string"}}},"Common.V4.Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["code","message"]}}}}},"paths":{"/v4/schedules/{scheduleID}/clone":{"post":{"operationId":"Schedules_cloneSchedule","summary":"Clone Schedule","parameters":[{"name":"scheduleID","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"The request has succeeded and a new resource has been created as a result.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/V4.ScheduleResponse"}}}}}},"400":{"description":"The server could not understand the request due to invalid syntax.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"401":{"description":"Access is unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"402":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"403":{"description":"Access is forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"404":{"description":"The server cannot find the requested resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"409":{"description":"The request conflicts with the current state of the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"422":{"description":"Client error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"502":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"503":{"description":"Service unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}},"504":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.V4.Error"}}}}},"tags":["Schedule"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.incidents.cloud.solarwinds.com/api-reference/schedule.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
