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

# Get operation schema

> Returns JSON Schema for an action or route operation. Agents should call this before constructing request payloads.



## OpenAPI

````yaml /api-reference/openapi.json get /api/agent/schema/{operation}
openapi: 3.1.0
info:
  title: Open Rails API
  version: 0.1.0
  description: >-
    Hosted checkout, provider routing, runtime schemas, and normalized webhook
    examples for Open Rails merchants and agents.
servers:
  - url: https://dash.getopenrails.com
    description: Production dashboard and API origin
security: []
tags:
  - name: Gateway
  - name: Agent
  - name: Routing
  - name: Webhooks
paths:
  /api/agent/schema/{operation}:
    get:
      tags:
        - Agent
      summary: Get operation schema
      description: >-
        Returns JSON Schema for an action or route operation. Agents should call
        this before constructing request payloads.
      operationId: getAgentOperationSchema
      parameters:
        - name: operation
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/SchemaOperation'
      responses:
        '200':
          description: Input and output schema
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchemaResponse'
        '404':
          description: Unknown operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchemaErrorResponse'
components:
  schemas:
    SchemaOperation:
      type: string
      enum:
        - checkout.preview
        - checkout.create
        - fees.estimate
        - webhook.example
        - webhook.verify_sample
        - routes.list
        - capabilities
    SchemaResponse:
      type: object
      required:
        - ok
        - operation
        - inputSchema
        - outputSchema
      properties:
        ok:
          type: boolean
          enum:
            - true
        operation:
          $ref: '#/components/schemas/SchemaOperation'
        inputSchema:
          type:
            - object
            - 'null'
        outputSchema:
          type: object
    SchemaErrorResponse:
      type: object
      required:
        - ok
        - operation
        - error
      properties:
        ok:
          type: boolean
          enum:
            - false
        operation:
          type: string
        error:
          $ref: '#/components/schemas/ActionError'
    ActionError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
        message:
          type: string
        field:
          type: string
        suggestion:
          type: string
        issues:
          type: array
          items:
            type: object
            properties:
              path:
                type: string
              code:
                type: string
              message:
                type: string

````