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

# Toggle Schedule

> Pause or unpause a schedule for the connection associated with your access token.



## OpenAPI

````yaml patch /schedules/{function_name}/toggle
openapi: 3.1.0
info:
  description: >

    Trackstar is a Unified API that provides standard endpoints for Supply Chain
    Logistics. We currently offer an API for Warehouse Management Systems (WMS).
  title: Trackstar API
  version: 0.1.0
servers:
  - description: Trackstar API
    url: https://production.trackstarhq.com
security: []
tags: []
externalDocs:
  description: Trackstar API Documentation
  url: https://docs.trackstarhq.com
paths:
  /schedules/{function_name}/toggle:
    patch:
      tags:
        - Schedules
      summary: Toggle Schedule
      description: >-
        Pause or unpause a schedule for the connection associated with your
        access token.
      operationId: patch_toggle_schedule
      parameters:
        - in: path
          name: function_name
          schema:
            type: string
          required: true
        - in: header
          name: x-trackstar-api-key
          description: Your organization-level Trackstar API key.
          schema:
            type: string
            example: <x-trackstar-api-key>
          required: true
        - in: header
          name: x-trackstar-access-token
          description: >-
            Your user's access token for a specific integration (ShipHero,
            Extensiv, etc).
          schema:
            type: string
            example: <x-trackstar-access-token>
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ToggleScheduleSchema'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateResponseSchema'
          description: Successful response
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
          description: Not found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: Validation error
components:
  schemas:
    ToggleScheduleSchema:
      type: object
      properties:
        paused:
          type: boolean
          description: Whether the schedule is paused.
          example: true
      required:
        - paused
      additionalProperties: false
      title: ToggleScheduleSchema
    UpdateResponseSchema:
      type: object
      properties:
        id:
          type: string
          description: The id of the updated object.
          example: example-id-123
        object:
          type: string
          description: The type of the object that was updated.
          example: connection
        updated:
          type: boolean
          description: Whether or not the object was updated.
          example: true
      required:
        - id
        - object
        - updated
      additionalProperties: false
      title: UpdateResponseSchema
    HTTPError:
      properties:
        error:
          type: string
        id:
          type: string
          description: The ID of the item that wasn't found.
      required:
        - error
      type: object
      title: HTTPError
    ValidationError:
      properties:
        error:
          type: string
        detail:
          type: object
          properties:
            <location>:
              type: object
              properties:
                <field_name>:
                  type: array
                  items:
                    type: string
      required:
        - error
      type: object
      title: ValidationError

````