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

# Schema

> Fetch the input and output parameter schema for a published Runchat workflow. Use the parameter IDs to build requests to the Run endpoint.



## OpenAPI

````yaml GET /{runchat_id}/schema
openapi: 3.1.0
info:
  title: Runchat API
  description: API for executing Runchat flows and retrieving schema information.
  version: 1.0.0
servers:
  - url: https://runchat.com/api/v1
    description: Relative path for the API endpoints
security:
  - bearerAuth: []
tags:
  - name: Execution
    description: Endpoints related to running Runchat flows.
  - name: Schema
    description: Endpoints for retrieving Runchat flow structure and definitions.
  - name: Canvas
    description: >-
      Endpoints for programmatic canvas manipulation — reading, creating,
      connecting, and running nodes.
  - name: Jobs
    description: >-
      Endpoints for triggering saved Runchat jobs — scheduled flow runs and
      agent tasks.
paths:
  /{runchat_id}/schema:
    parameters:
      - name: runchat_id
        in: path
        required: true
        description: >-
          The unique identifier for the Runchat. The Runchat ID can be found in
          the id parameter of the URL when open in the editor.
        schema:
          type: string
    get:
      tags:
        - Schema
      summary: Get Runchat Schema
      description: >-
        Retrieves the defined API input and output parameters for a specific
        Runchat flow.
      responses:
        '200':
          description: Successful retrieval of the Runchat schema.
          content:
            application/json:
              schema:
                type: object
                properties:
                  inputs:
                    type: array
                    items:
                      $ref: '#/components/schemas/BasicParameter'
                    description: Array of input parameters defined in the Runchat API.
                  outputs:
                    type: array
                    items:
                      $ref: '#/components/schemas/BasicParameter'
                    description: Array of output parameters defined in the Runchat API.
                  name:
                    type: string
                    description: The name of the Runchat flow.
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    BasicParameter:
      type: object
      properties:
        id:
          type: string
          description: >-
            Unique identifier for the parameter, often in the format
            'paramKey_parentNodeId'.
        label:
          type: string
          description: User-friendly label for the parameter.
        type:
          $ref: '#/components/schemas/DataTypes'
        description:
          type: string
          description: Description of the parameter.
        data:
          type: array
          items:
            type: object
            description: >-
              Represents a single data item, type varies based on the
              parameter's 'type' field.
          description: >-
            The actual data associated with the parameter, represented as an
            array of items.
      required:
        - id
        - label
        - type
        - description
        - data
    DataTypes:
      type: string
      enum:
        - string
        - number
        - boolean
        - object
        - image
        - video
        - audio
        - model
        - message
        - context
        - code
        - array
        - instruction
        - 'null'
        - markdown
        - file
        - format
        - html
        - pdf
        - trigger
        - select
      description: Enumeration of supported data types within Runchat.
    Error:
      type: object
      properties:
        error:
          type: string
          description: A message describing the error.
      required:
        - error
  responses:
    BadRequest:
      description: >-
        Bad Request - The request could not be understood or was missing
        required parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Internal Server Error - An unexpected error occurred on the server.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token authentication using Runchat API key. API keys can be
        created from the account menu

````