> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shiftkeeper.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Override a schedule shift

> Create a new schedule override.



## OpenAPI

````yaml https://api.shiftkeeper.io/openapi.json post /schedules/{schedule_id}/overrides/
openapi: 3.1.0
info:
  title: Shiftkeeper API
  description: API reference to interact with Shiftkeeper programatically
  version: 0.0.1
servers:
  - url: https://api.shiftkeeper.io
security:
  - apiKey: []
externalDocs:
  url: https://docs.shiftkeeper.io
  description: Learn more about Shiftkeeper
paths:
  /schedules/{schedule_id}/overrides/:
    post:
      tags:
        - Overrides
      summary: Override a schedule shift
      description: Create a new schedule override.
      parameters:
        - schema:
            type: string
          examples:
            sch_oKjoLJUl47g7OYYVPUG5t:
              value: sch_oKjoLJUl47g7OYYVPUG5t
            sch_kje7ER643ED0STVnB8Zc9:
              value: sch_kje7ER643ED0STVnB8Zc9
          in: path
          name: schedule_id
          required: true
          description: The ID of the schedule.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewScheduleOverride'
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  override:
                    $ref: '#/components/schemas/ScheduleOverride'
                required:
                  - override
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    $ref: '#/components/schemas/NotFoundError'
                required:
                  - error
components:
  schemas:
    NewScheduleOverride:
      type: object
      properties:
        start:
          type: string
          format: date-time
          description: >-
            The start date and time of the override. ISO 8601 format, UTC
            timezone.
        end:
          type: string
          format: date-time
          description: >-
            The end date and time of the override. ISO 8601 format, UTC
            timezone.
        user_references:
          type: array
          items:
            $ref: '#/components/schemas/UserReference'
          minItems: 1
          maxItems: 4
          description: The users that that will be on-call during the override.
      required:
        - start
        - end
        - user_references
      examples:
        - start: '2024-12-01T00:00:00Z'
          end: '2024-12-08T00:00:00Z'
          user_references:
            - type: email
              value: dena@example.org
    ScheduleOverride:
      type: object
      properties:
        id:
          type: string
          description: The ID of the override.
        start:
          type: string
          format: date-time
          description: The start date and time of the override.
        end:
          type: string
          format: date-time
          description: The end date and time of the override.
        users:
          type: array
          items:
            $ref: '#/components/schemas/User'
          description: The on-call users during the override.
      required:
        - id
        - start
        - end
        - users
      examples:
        - id: ovr_i9fo8GI1YBAQhtoArC3N1
          start: '2024-12-01T00:00:00Z'
          end: '2024-12-08T00:00:00Z'
          users:
            - id: usr_C0GwCFdk0I4pBMRny4qYV
              name: Dena
              email: dena@example.org
              role: standard
              seat: member
              slack_id: U082GMAFR1T
    NotFoundError:
      type: object
      properties:
        message:
          type: string
        docs_url:
          type: string
        status:
          type: number
          const: 404
        code:
          type: string
          const: not_found
      required:
        - message
        - status
        - code
      example:
        code: not_found
        status: 404
        message: The requested resource was not found
    UserReference:
      oneOf:
        - type: object
          properties:
            type:
              type: string
              const: email
            value:
              type: string
              format: email
          required:
            - type
            - value
        - type: object
          properties:
            type:
              type: string
              const: slack_user_id
            value:
              type: string
          required:
            - type
            - value
        - type: object
          properties:
            type:
              type: string
              const: internal_user_id
            value:
              type: string
          required:
            - type
            - value
      examples:
        - type: email
          value: emma@example.org
        - type: email
          value: lily@example.org
        - type: email
          value: rick@example.org
        - type: slack_user_id
          value: U082KENSEQ3
        - type: internal_user_id
          value: usr_bq7CmsOKLmkMeZkUUu1hy
    User:
      type: object
      properties:
        id:
          type: string
          description: The ID of the user.
        name:
          type: string
          description: The name of the user.
        email:
          type: string
          format: email
          description: The email of the user.
        time_zone:
          type: string
          description: >-
            The preferred time zone of the user. If not set, the organization's
            time zone will be used.
        role:
          type: string
          enum:
            - owner
            - standard
          description: >-
            The role of the user. Learn more about roles in [our
            docs](/shiftkeeper/workspace/users#roles).
        seat:
          type: string
          enum:
            - viewer
            - member
          description: >-
            The seat of the user. Learn more about seat in [our
            docs](/shiftkeeper/workspace/users#seats).
        slack_id:
          type: string
          description: The Slack ID of the user.
      required:
        - id
        - name
        - email
        - role
        - seat
      examples:
        - id: usr_bq7CmsOKLmkMeZkUUu1hy
          name: Rick
          email: rick@example.org
          time_zone: Europe/Paris
          role: owner
          seat: member
          slack_id: U082KENSEQ3
        - id: usr_C0GwCFdk0I4pBMRny4qYV
          name: Dena
          email: dena@example.org
          role: standard
          seat: member
          slack_id: U082GMAFR1T
        - id: usr_YlxrjoB1JqUsollScfFYT
          name: Lily
          email: lily@example.org
          time_zone: America/New_York
          role: standard
          seat: viewer
          slack_id: U0529FWNCG2
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Enter your API key which starts with 'keeper_'

````