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

# Trigger a schedule run

> Start a schedule run immediately using the schedule task. Does not replace or advance the cron pending run.



## OpenAPI

````yaml /openapi.json post /api/v1/schedules/runs
openapi: 3.1.0
info:
  description: >-
    HTTP API for the TrueForge agent server (`/api/v1`). Interactive docs are
    served at `/api/v1/docs` (OpenAPI JSON at `/api/v1/openapi.json`).


    **Authentication:** Standalone auth accepts requests without credentials —
    middleware stamps a local default user. When OIDC or TrueFoundry auth is
    configured, protected routes require a valid cookie or `Authorization:
    Bearer` token. There is no built-in API-key scheme; pass custom headers only
    if your reverse proxy or IdP layer requires them.


    Covers DB-backed sessions, the agent registry, settings catalogs, and
    model/MCP/skill/sandbox providers.
  title: TrueForge API
  version: 0.0.0
servers: []
security:
  - BearerAuth: []
tags:
  - name: Internal
  - name: Auth
  - name: Capabilities
  - name: Models
  - name: MCP Servers
  - name: Skills
  - name: Sandboxes
  - name: Web Search Providers
  - name: Agents
  - name: Schedules
  - name: Agent Sessions
paths:
  /api/v1/schedules/runs:
    post:
      tags:
        - Schedules
      summary: Trigger a schedule run
      description: >-
        Start a schedule run immediately using the schedule task. Does not
        replace or advance the cron pending run.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateScheduleRunRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateScheduleRunResponse'
          description: Run created.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestErrorResponse'
          description: Invalid request or turn input.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestErrorResponse'
          description: The caller is not the schedule creator.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestErrorResponse'
          description: Schedule or agent not found.
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestErrorResponse'
          description: Run name conflict (retry).
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestErrorResponse'
          description: The run cannot be started (e.g. agent resources unavailable).
components:
  schemas:
    CreateScheduleRunRequest:
      additionalProperties: false
      description: >-
        Trigger an immediate run for the given schedule. The task is taken from
        the schedule manifest.
      properties:
        schedule_id:
          description: Immutable schedule identifier.
          maxLength: 64
          minLength: 1
          type: string
      required:
        - schedule_id
      type: object
    CreateScheduleRunResponse:
      properties:
        data:
          $ref: '#/components/schemas/ScheduleRun'
      required:
        - data
      type: object
    RequestErrorResponse:
      properties:
        error:
          properties:
            code:
              description: Optional machine-readable error code; null when not applicable.
              type:
                - string
                - 'null'
            message:
              description: Human-readable explanation of the failure.
              type: string
            param:
              description: >-
                Optional request field that caused the error; null when not
                field-specific.
              type:
                - string
                - 'null'
            type:
              description: Optional error category (e.g. validation vs conflict).
              type: string
          required:
            - message
          type: object
      required:
        - error
      type: object
    ScheduleRun:
      additionalProperties: false
      properties:
        created_at:
          format: date-time
          type: string
        created_by_subject:
          $ref: '#/components/schemas/CreatedBySubject'
        id:
          type: string
        name:
          type: string
        reason:
          type:
            - string
            - 'null'
        schedule_id:
          type: string
        scheduled_for:
          format: date-time
          type: string
        status:
          $ref: '#/components/schemas/ScheduleRunStatus'
        triggered_at:
          format: date-time
          type:
            - string
            - 'null'
        updated_at:
          format: date-time
          type: string
      required:
        - id
        - schedule_id
        - name
        - scheduled_for
        - status
        - created_by_subject
        - triggered_at
        - reason
        - created_at
        - updated_at
      type: object
    CreatedBySubject:
      additionalProperties: false
      description: Who created this resource.
      properties:
        subject_display_name:
          description: Display name.
          minLength: 1
          type: string
        subject_id:
          description: Subject id.
          minLength: 1
          type: string
        subject_type:
          description: Subject type.
          minLength: 1
          type: string
      required:
        - subject_id
        - subject_type
        - subject_display_name
      type: object
    ScheduleRunStatus:
      enum:
        - scheduled
        - triggered
        - failed
      type: string
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: >-
        Caller credential (`Authorization: Bearer <token>`). Required on
        protected routes when auth is enabled. Browser sessions may use the
        HttpOnly `id_token` or `accessToken` cookie instead.
      scheme: bearer
      type: http

````

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