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

# Create Schedule

> Creates a new schedule to execute API calls at specified times. Supports both one-time executions and recurring schedules using cron expressions. You can also use natural language text to generate cron expressions automatically.



## OpenAPI

````yaml openapi/schedules.json POST /v1/schedules
openapi: 3.0.3
info:
  title: Schedules API
  version: 1.0.0
servers:
  - url: https://api.olostep.com
security: []
paths:
  /v1/schedules:
    post:
      summary: Create Schedule
      description: >-
        Creates a new schedule to execute API calls at specified times. Supports
        both one-time executions and recurring schedules using cron expressions.
        You can also use natural language text to generate cron expressions
        automatically. For POST requests, you can use short form Olostep
        endpoints (e.g., 'v1/scrapes') which will be automatically prefixed, or
        provide a full URL. The payload can contain any JSON structure you want
        to send.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  enum:
                    - GET
                    - POST
                  description: >-
                    HTTP method for the scheduled API call. Must be either GET
                    or POST.
                endpoint:
                  type: string
                  description: >-
                    The endpoint URL to call when the schedule executes. For
                    POST requests with Olostep endpoints, you can use short form
                    (e.g., 'v1/scrapes', 'v1/batches', 'v1/crawls', 'v1/maps',
                    'v1/answers') which will be automatically prefixed with
                    'https://api.olostep.com/'. For other endpoints, provide the
                    full URL.
                payload:
                  type: object
                  description: >-
                    The payload to send with the API call. Can contain any JSON
                    structure you need. For GET requests, this is typically
                    empty. For POST requests, this should contain the data you
                    want to send to the endpoint.
                  default: {}
                cron_expression:
                  type: string
                  description: >-
                    Cron expression in 6 fields format (minute hour day month
                    day-of-week year) for recurring schedules. Required for
                    recurring schedules. Mutually exclusive with execute_at and
                    text.
                execute_at:
                  type: string
                  format: date-time
                  description: >-
                    ISO 8601 datetime string for one-time schedule execution.
                    Must be a valid future datetime. Required for one-time
                    schedules. Mutually exclusive with cron_expression.
                expression_timezone:
                  type: string
                  description: >-
                    IANA timezone identifier (e.g., 'UTC', 'America/New_York',
                    'Europe/London') for the schedule. Required for recurring
                    schedules, optional for one-time schedules. When using
                    natural language text, this defaults to 'UTC'.
                text:
                  type: string
                  description: >-
                    Natural language text to automatically generate a cron
                    expression. The system will convert your text into a valid
                    cron expression. Examples: 'every 3 minutes', 'every day at
                    10am', 'every Monday at 9am'. Mutually exclusive with
                    cron_expression and execute_at. When used,
                    expression_timezone defaults to 'UTC'.
              required:
                - method
                - endpoint
      responses:
        '200':
          description: Schedule created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique schedule identifier
                  type:
                    type: string
                    enum:
                      - recurring
                      - onetime
                    description: >-
                      Type of schedule: 'recurring' for cron-based schedules,
                      'onetime' for single execution schedules
                  method:
                    type: string
                    enum:
                      - GET
                      - POST
                    description: HTTP method for the scheduled call
                  endpoint:
                    type: string
                    description: The endpoint URL that will be called
                  cron_expression:
                    type: string
                    description: Cron expression (only present for recurring schedules)
                  execute_at:
                    type: string
                    format: date-time
                    description: Execution datetime (only present for one-time schedules)
                  expression_timezone:
                    type: string
                    description: Timezone for the schedule
                  created:
                    type: string
                    format: date-time
                    description: ISO 8601 datetime when the schedule was created
        '400':
          description: >-
            Bad request due to incorrect or missing parameters. Common errors:
            invalid method, missing endpoint, invalid cron_expression, invalid
            execute_at datetime, invalid timezone, or invalid schedule_id
            format.
        '401':
          description: >-
            Invalid API key. Try double-checking it or reaching out to
            info@olostep.com if you're facing issues.
        '500':
          description: Internal server error while creating schedule.
      security:
        - Authorization: []
components:
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form Bearer <token>, where <token>
        is your auth token.

````