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

# Add a schedule to an Automation

> Adds a schedule that kicks the Automation off with `inputs` at the times `recurrence` describes. All times
are UTC. The new schedule starts `enabled`, with its first run in `next_run_at`.

A schedule runs as the member who adds it, with their credentials and connected apps, so this takes a
delegated token whose member may run the Automation. A plain service-account token has no member to run
as and gets `403`, as does a member who can read the Automation but not run it.




## OpenAPI

````yaml /openapi/platform-v1.yaml post /api/v1/automations/{automation_id}/schedules
openapi: 3.0.1
info:
  title: CrewAI Platform API
  version: v1
  description: Supported public API for CrewAI Platform.
servers:
  - url: https://app.crewai.com
    description: Current CrewAI Platform host
security:
  - bearerAuth: []
tags:
  - name: Users
    description: Users in the organization.
  - name: Status
    description: Platform health and API availability.
  - name: Automations
    description: >-
      Automations, their source artifacts, their executions, and their
      schedules.
  - name: Teams
    description: Teams in the organization.
  - name: Group Mappings
    description: Identity-provider group mappings to Teams.
  - name: Service Accounts
    description: Service accounts in the organization.
  - name: Webhook Endpoints
    description: Endpoints that receive signed event deliveries.
  - name: Studio Projects
    description: Projects built in Crew Studio.
  - name: Environment Variables
    description: Environment variables in the organization.
  - name: Git Repositories
    description: Git repositories connected to the organization.
  - name: LLM Connections
    description: Connections to LLM providers.
  - name: Tools
    description: Tools in the organization's tool repository.
  - name: Applications
    description: Applications the organization can connect, with their tools and triggers.
  - name: Connections
    description: Application connections the caller can use.
paths:
  /api/v1/automations/{automation_id}/schedules:
    parameters:
      - name: automation_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          example: 4f6d0d9a-7b78-4c6a-b64f-2e2e3d2c8f9a
    post:
      tags:
        - Automations
      summary: Add a schedule to an Automation
      description: >
        Adds a schedule that kicks the Automation off with `inputs` at the times
        `recurrence` describes. All times

        are UTC. The new schedule starts `enabled`, with its first run in
        `next_run_at`.


        A schedule runs as the member who adds it, with their credentials and
        connected apps, so this takes a

        delegated token whose member may run the Automation. A plain
        service-account token has no member to run

        as and gets `403`, as does a member who can read the Automation but not
        run it.
      operationId: createAutomationSchedule
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                recurrence:
                  type: object
                  required:
                    - type
                  additionalProperties: false
                  description: >-
                    When the schedule runs. Holds only the fields its `type`
                    uses; a field the stored schedule has no value for is
                    absent. When sent, a field that belongs to another `type` is
                    rejected with `422`.
                  properties:
                    type:
                      type: string
                      example: weekly
                      enum:
                        - once
                        - daily
                        - weekly
                        - monthly
                        - cron
                      description: >
                        How the schedule repeats. All times are UTC.

                        - `once`: A single run at `run_at`.

                        - `daily`: Every `interval` days at `time_of_day`.

                        - `weekly`: Every `interval` weeks on `days_of_week` at
                        `time_of_day`.

                        - `monthly`: Every `interval` months at `time_of_day`,
                        on the day of the month of the previous run.

                        - `cron`: Whenever `cron_expression` matches.
                    interval:
                      type: integer
                      minimum: 1
                      example: 1
                      description: >-
                        Days, weeks or months between runs, for `daily`,
                        `weekly` and `monthly`. Defaults to 1 when sent without
                        one.
                    time_of_day:
                      type: string
                      example: '09:30'
                      pattern: ^\d{2}:\d{2}$
                      description: >-
                        UTC time of day as `HH:MM`, for `daily`, `weekly` and
                        `monthly`.
                    days_of_week:
                      type: array
                      items:
                        type: string
                        example: monday
                        enum:
                          - monday
                          - tuesday
                          - wednesday
                          - thursday
                          - friday
                          - saturday
                          - sunday
                          - unknown
                      minItems: 1
                      maxItems: 1
                      example:
                        - monday
                      description: >-
                        The days a `weekly` schedule runs. One day is supported
                        today; `unknown` means the stored day is not a weekday.
                    run_at:
                      type: string
                      format: date-time
                      example: '2026-11-01T09:00:00Z'
                      description: >-
                        When a `once` schedule runs. Must be in the future when
                        sent.
                    cron_expression:
                      type: string
                      example: 0 9 * * 1
                      description: >-
                        When a `cron` schedule runs, in UTC: a standard
                        five-field cron expression, or a phrase such as `every
                        15 minutes` or `every Saturday at noon`.
                  example:
                    type: weekly
                    interval: 1
                    time_of_day: '09:30'
                    days_of_week:
                      - monday
                inputs:
                  type: object
                  additionalProperties: true
                  example:
                    topic: AI
                  description: >-
                    The inputs each run of the schedule kicks the Automation off
                    with.
              required:
                - recurrence
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              examples:
                created:
                  value:
                    data:
                      id: 4f6d0d9a-7b78-4c6a-b64f-2e2e3d2c8f9a
                      status: enabled
                      recurrence:
                        type: weekly
                        interval: 1
                        time_of_day: '09:30'
                        days_of_week:
                          - monday
                      inputs:
                        topic: AI
                      created_by:
                        type: User
                        id: f9630a31-1640-4f02-865b-3f92e4d99335
                      next_run_at: '2026-11-02T09:30:00Z'
                      last_run_at: null
                      created_at: '2026-07-07T00:00:00Z'
                      updated_at: '2026-07-07T00:00:00Z'
                  summary: Schedule added
              schema:
                type: object
                required:
                  - data
                additionalProperties: false
                properties:
                  data:
                    type: object
                    required:
                      - id
                      - status
                      - recurrence
                      - inputs
                      - created_by
                      - next_run_at
                      - last_run_at
                      - created_at
                      - updated_at
                    additionalProperties: false
                    properties:
                      id:
                        type: string
                        format: uuid
                        example: 4f6d0d9a-7b78-4c6a-b64f-2e2e3d2c8f9a
                      status:
                        type: string
                        example: enabled
                        enum:
                          - enabled
                          - disabled
                        description: >
                          Whether the schedule runs:

                          - `enabled`: The next run is queued; see
                          `next_run_at`.

                          - `disabled`: Nothing is queued until the schedule is
                          enabled again. Enabling it queues the next run in the
                          future; runs missed while disabled are not caught up.
                      recurrence:
                        type: object
                        required:
                          - type
                        additionalProperties: false
                        description: >-
                          When the schedule runs. Holds only the fields its
                          `type` uses; a field the stored schedule has no value
                          for is absent. When sent, a field that belongs to
                          another `type` is rejected with `422`.
                        properties:
                          type:
                            type: string
                            example: weekly
                            enum:
                              - once
                              - daily
                              - weekly
                              - monthly
                              - cron
                            description: >
                              How the schedule repeats. All times are UTC.

                              - `once`: A single run at `run_at`.

                              - `daily`: Every `interval` days at `time_of_day`.

                              - `weekly`: Every `interval` weeks on
                              `days_of_week` at `time_of_day`.

                              - `monthly`: Every `interval` months at
                              `time_of_day`, on the day of the month of the
                              previous run.

                              - `cron`: Whenever `cron_expression` matches.
                          interval:
                            type: integer
                            minimum: 1
                            example: 1
                            description: >-
                              Days, weeks or months between runs, for `daily`,
                              `weekly` and `monthly`. Defaults to 1 when sent
                              without one.
                          time_of_day:
                            type: string
                            example: '09:30'
                            pattern: ^\d{2}:\d{2}$
                            description: >-
                              UTC time of day as `HH:MM`, for `daily`, `weekly`
                              and `monthly`.
                          days_of_week:
                            type: array
                            items:
                              type: string
                              example: monday
                              enum:
                                - monday
                                - tuesday
                                - wednesday
                                - thursday
                                - friday
                                - saturday
                                - sunday
                                - unknown
                            minItems: 1
                            maxItems: 1
                            example:
                              - monday
                            description: >-
                              The days a `weekly` schedule runs. One day is
                              supported today; `unknown` means the stored day is
                              not a weekday.
                          run_at:
                            type: string
                            format: date-time
                            example: '2026-11-01T09:00:00Z'
                            description: >-
                              When a `once` schedule runs. Must be in the future
                              when sent.
                          cron_expression:
                            type: string
                            example: 0 9 * * 1
                            description: >-
                              When a `cron` schedule runs, in UTC: a standard
                              five-field cron expression, or a phrase such as
                              `every 15 minutes` or `every Saturday at noon`.
                        example:
                          type: weekly
                          interval: 1
                          time_of_day: '09:30'
                          days_of_week:
                            - monday
                      inputs:
                        type: object
                        additionalProperties: true
                        example:
                          topic: AI
                        description: >-
                          The inputs each run of the schedule kicks the
                          Automation off with.
                      created_by:
                        type: object
                        required:
                          - type
                          - id
                        additionalProperties: false
                        properties:
                          type:
                            type: string
                            example: User
                            enum:
                              - User
                            x-crewai-enum-format: freeform
                          id:
                            type: string
                            format: uuid
                            example: 4f6d0d9a-7b78-4c6a-b64f-2e2e3d2c8f9a
                        nullable: true
                        description: >-
                          The member who added the schedule; its runs use their
                          credentials and connected apps. Null for a schedule
                          published from Crew Studio or added before this was
                          recorded, which runs as the Automation owner.
                      next_run_at:
                        type: string
                        format: date-time
                        example: '2026-11-02T09:30:00Z'
                        nullable: true
                        description: >-
                          When the next run is queued for. Null while the
                          schedule is disabled, or after a `once` schedule has
                          run.
                      last_run_at:
                        type: string
                        format: date-time
                        example: null
                        nullable: true
                        description: >-
                          When the schedule last kicked off a run. Null until it
                          has run.
                      created_at:
                        type: string
                        format: date-time
                        example: '2026-07-07T00:00:00Z'
                      updated_at:
                        type: string
                        format: date-time
                        example: '2026-07-07T00:00:00Z'
        '400':
          description: Bad Request
          content:
            application/json:
              examples:
                missing_recurrence:
                  value:
                    errors:
                      - type: >-
                          https://docs-platform.crewai.com/api/problems/bad_request
                        code: bad_request
                        title: Bad request
                        status: 400
                        detail: The request is invalid.
                  summary: Missing recurrence
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                unauthorized:
                  value:
                    errors:
                      - type: >-
                          https://docs-platform.crewai.com/api/problems/unauthorized
                        code: unauthorized
                        title: Unauthorized
                        status: 401
                        detail: Missing or invalid bearer token.
                  summary: Missing or invalid bearer token
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '403':
          description: Forbidden
          content:
            application/json:
              examples:
                no_member:
                  value:
                    errors:
                      - type: >-
                          https://docs-platform.crewai.com/api/problems/forbidden
                        code: forbidden
                        title: Forbidden
                        status: 403
                        detail: >-
                          A delegated token is required to add a schedule; it
                          runs as that token's member.
                  summary: >-
                    A plain service-account token has no member for the schedule
                    to run as
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: Not Found
          content:
            application/json:
              examples:
                not_found:
                  value:
                    errors:
                      - type: >-
                          https://docs-platform.crewai.com/api/problems/not_found
                        code: not_found
                        title: Not found
                        status: 404
                        detail: The requested resource could not be found.
                  summary: Automation is outside the token's organization
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '422':
          description: Unprocessable Content
          content:
            application/json:
              examples:
                field_of_another_type:
                  value:
                    errors:
                      - type: >-
                          https://docs-platform.crewai.com/api/problems/validation_error
                        code: validation_error
                        title: Validation error
                        status: 422
                        detail: run_at does not apply to daily schedules
                  summary: A field that belongs to another recurrence type
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
components:
  schemas:
    ErrorEnvelope:
      type: object
      required:
        - errors
      additionalProperties: false
      properties:
        errors:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/Error'
    Error:
      type: object
      description: Public API error object.
      required:
        - type
        - code
        - title
        - status
        - detail
      additionalProperties: false
      properties:
        type:
          type: string
          format: uri
          enum:
            - https://docs-platform.crewai.com/api/problems/bad_request
            - https://docs-platform.crewai.com/api/problems/clipper_disabled
            - https://docs-platform.crewai.com/api/problems/clipper_disallowed
            - >-
              https://docs-platform.crewai.com/api/problems/clipper_feature_disabled
            - https://docs-platform.crewai.com/api/problems/clipper_not_found
            - https://docs-platform.crewai.com/api/problems/conflict
            - https://docs-platform.crewai.com/api/problems/forbidden
            - https://docs-platform.crewai.com/api/problems/internal_error
            - https://docs-platform.crewai.com/api/problems/not_found
            - https://docs-platform.crewai.com/api/problems/service_unavailable
            - >-
              https://docs-platform.crewai.com/api/problems/tool_execution_failed
            - https://docs-platform.crewai.com/api/problems/unauthorized
            - https://docs-platform.crewai.com/api/problems/validation_error
          example: https://docs-platform.crewai.com/api/problems/bad_request
        code:
          type: string
          enum:
            - bad_request
            - clipper_disabled
            - clipper_disallowed
            - clipper_feature_disabled
            - clipper_not_found
            - conflict
            - forbidden
            - internal_error
            - not_found
            - service_unavailable
            - tool_execution_failed
            - unauthorized
            - validation_error
          example: bad_request
        title:
          type: string
          x-crewai-enum-format: freeform
          enum:
            - Bad request
            - Clipper resource disabled
            - Clipper resource disallowed
            - Clipper feature disabled
            - Clipper resource not found
            - Conflict
            - Forbidden
            - Internal error
            - Not found
            - Service unavailable
            - Tool execution failed
            - Unauthorized
            - Validation error
          example: Bad request
        status:
          type: integer
          enum:
            - 400
            - 401
            - 403
            - 404
            - 409
            - 422
            - 500
            - 503
          example: 400
        detail:
          type: string
          example: The request is invalid.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: opaque

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.