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

# Create a schedule



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/runtime/v1/schedules
openapi: 3.0.0
info:
  title: Runflow Runtime API
  description: >-
    Programmatic surface for the Runflow platform — used by the SDK, the CLI,
    the execution engine, and any server-to-server caller. Authenticate with an
    `x-api-key` header (or `Authorization: Bearer ...`).
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.runflow.ai
    description: Production
  - url: http://localhost:3000
    description: Local development
security: []
tags: []
paths:
  /api/v1/runtime/v1/schedules:
    post:
      tags:
        - Runtime API - Schedules
      summary: Create a schedule
      operationId: RuntimeSchedulesController_createSchedule
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateScheduleDto'
      responses:
        '201':
          description: Schedule created successfully.
      security:
        - bearer: []
components:
  schemas:
    CreateScheduleDto:
      type: object
      properties:
        name:
          type: string
          description: Schedule name
          example: Daily Report
        type:
          type: string
          description: Schedule type
          enum:
            - interval
            - daily
            - cron
          example: interval
        interval:
          type: number
          description: Interval in minutes (required for type "interval")
          example: 60
          minimum: 1
          maximum: 43200
        time:
          type: string
          description: Time in HH:mm format (required for type "daily")
          example: '09:00'
        cron:
          type: string
          description: Cron expression (required for type "cron")
          example: 0 9 * * *
        timezone:
          type: string
          description: Timezone for scheduled executions
          example: America/Sao_Paulo
          default: America/Sao_Paulo
        message:
          type: string
          description: Message sent to agent on each scheduled execution
          example: Run the daily report task
        maxExecutions:
          type: number
          description: Maximum number of executions (0 = unlimited)
          example: 0
          minimum: 0
          default: 0
        metadata:
          type: object
          description: Additional metadata for the schedule
          example:
            reportType: daily
        executionContext:
          description: >-
            Conversation context captured automatically by the SDK (entityType,
            entityValue, sessionId, userId)
          example:
            entityType: phone
            entityValue: '+5511999999999'
          allOf:
            - $ref: '#/components/schemas/ExecutionContextDto'
      required:
        - name
        - type
        - message
    ExecutionContextDto:
      type: object
      properties: {}

````