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

# Create a new schedule

> Creates a new schedule for triggering workflows. The schedule can be either a cron-based recurring schedule or a one-time schedule. When triggered, notifications are published to the specified topic.



## OpenAPI

````yaml /openapi/em-runtime-utils-v2.yaml post /utils/schedules
openapi: 3.1.0
info:
  title: em_runtime_utils
  version: 5.27.0
servers: []
security: []
paths:
  /utils/schedules:
    post:
      tags:
        - schedules
      summary: Create a new schedule
      description: >-
        Creates a new schedule for triggering workflows. The schedule can be
        either a cron-based recurring schedule or a one-time schedule. When
        triggered, notifications are published to the specified topic.
      operationId: create_schedule
      parameters:
        - name: X-Project-ID
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Project-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScheduleCreateRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleCreateResponse'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    ScheduleCreateRequest:
      properties:
        schedule_name:
          type: string
          title: Schedule Name
          description: Unique human readable name for the schedule
        schedule:
          anyOf:
            - $ref: '#/components/schemas/CronSchedule'
            - $ref: '#/components/schemas/OneOffSchedule'
          title: Schedule
          description: Schedule configuration
        reference_id:
          type: string
          title: Reference Id
          description: >-
            Reference ID (e.g. workflow config ID) held in Data Readiness
            resources
        config:
          $ref: '#/components/schemas/NotificationConfig'
          description: Schedule configuration (currently only NOTIFICATION is supported)
        enabled:
          type: boolean
          title: Enabled
          description: Whether the schedule is ready to be triggered
      type: object
      required:
        - schedule_name
        - schedule
        - reference_id
        - config
        - enabled
      title: ScheduleCreateRequest
      description: Request body for creating a schedule.
    ScheduleCreateResponse:
      properties:
        schedule_id:
          type: string
          title: Schedule Id
          description: ID of the created schedule
      type: object
      required:
        - schedule_id
      title: ScheduleCreateResponse
      description: Response body for a newly created schedule.
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      type: object
      required:
        - error
      title: ErrorResponse
      description: Standard error response model.
    CronSchedule:
      properties:
        type:
          type: string
          const: cron
          title: Type
          description: Schedule type
        cron:
          type: string
          title: Cron
          description: Cron expression (e.g., '0 9 * * 1')
        timezone:
          type: string
          title: Timezone
          description: >-
            IANA timezone name (e.g., 'America/New_York', 'Europe/London').
            Defaults to UTC.
          default: UTC
      type: object
      required:
        - type
        - cron
      title: CronSchedule
      description: |-
        Cron-based schedule configuration.

        The cron expression is interpreted in the specified timezone.
        It will be converted to UTC for storage and execution.
    OneOffSchedule:
      properties:
        type:
          type: string
          const: one_off
          title: Type
          description: Schedule type
        at:
          type: string
          format: date-time
          title: At
          description: >-
            ISO 8601 datetime when the schedule should trigger (must be
            timezone-naive with zero seconds/microseconds, e.g.,
            '2026-02-10T14:30:00')
        timezone:
          type: string
          title: Timezone
          description: >-
            IANA timezone name (e.g., 'America/New_York', 'Europe/London').
            Defaults to UTC.
          default: UTC
      type: object
      required:
        - type
        - at
      title: OneOffSchedule
      description: >-
        One-time schedule configuration.


        The datetime must be timezone-naive and will be interpreted in the
        specified timezone.

        It will be converted to UTC for storage and execution.


        Note: Cron expressions only support minute-level precision, so seconds
        and microseconds

        must be zero. The datetime must be in the format 'YYYY-MM-DDTHH:MM:00'.


        Example: "2026-02-10T14:30:00" (timezone-naive, interpreted in the
        'timezone' field)
    NotificationConfig:
      properties:
        type:
          type: string
          const: NOTIFICATION
          title: Type
          description: Schedule configuration type
        topic:
          type: string
          title: Topic
          description: >-
            Topic string describing where to publish notifications when the
            schedule triggers
        extra_data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Extra Data
          description: Optional extra data to include in the published notification payload
      type: object
      required:
        - type
        - topic
      title: NotificationConfig
      description: Configuration for notification-type schedules.
    ErrorBody:
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          title: Message
        details:
          additionalProperties: true
          type: object
          title: Details
        request_id:
          type: string
          title: Request Id
        timestamp:
          type: string
          format: date-time
          title: Timestamp
      type: object
      required:
        - code
        - message
        - request_id
        - timestamp
      title: ErrorBody
      description: Error body with structured details.
    ErrorCode:
      type: string
      enum:
        - INVALID_REQUEST
        - INVALID_TOKEN
        - INSUFFICIENT_PERMISSIONS
        - RESOURCE_NOT_FOUND
        - RESOURCE_ALREADY_EXISTS
        - VALIDATION_ERROR
        - RATE_LIMIT_EXCEEDED
        - SERVICE_UNAVAILABLE
        - INTERNAL_ERROR
      title: ErrorCode
      description: Standard error codes for API responses.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````