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

> ## Agent Instructions
> Checkfu is open source (https://github.com/checkfu/checkfu) and runs in the reader's own Cloudflare account. There is no shared hosted base URL: `checkfu deploy` prints the deployment's API URL (`https://<api-worker>.workers.dev` or the CHECKFU_API_DOMAIN hostname, exported as `CHECKFU_BASE_URL` for the CLI, SDK, and curl) and MCP URL (`.../mcp`). Local development serves the API on http://localhost:1337 and MCP on http://localhost:1338/mcp.
> Authenticated HTTP requests send the deployment's CHECKFU_API_KEY as `Authorization: Bearer $CHECKFU_API_KEY` (or `x-api-key`) and `Content-Type: application/json` for JSON bodies. Pass `Idempotency-Key` on retriable writes.
> Core workflow: create an Agent (`POST /v1/agents`) and an Environment (`POST /v1/environments`), create a Session that references both (`POST /v1/sessions`), send a `user.message` event (`POST /v1/sessions/{session_id}/events`), and follow `GET /v1/sessions/{session_id}/events/stream` until `session.status_idle`.
> Other resources: Memory stores (`/v1/memory_stores`), Files (`/v1/files`), Artifacts (`/v1/artifacts`), Vaults and credentials (`/v1/vaults`), Provider credentials (`/v1/provider_credentials`), Automations (`/v1/automations`), Inbound bindings (`/v1/inbound_bindings`), and Webhooks (`/v1/webhooks`). The deployment serves its OpenAPI 3.1 specification at `GET /openapi.json`.

# Retrieve a session

> Retrieve a session by ID



## OpenAPI

````yaml /openapi.json get /v1/sessions/{session_id}
openapi: 3.1.0
info:
  title: Checkfu API
  version: 0.0.1
  description: >-
    Managed agents API for managing agents, environments, sessions, automations,
    artifacts, vaults, memory stores, and outbound webhooks.
servers: []
security: []
tags:
  - name: health
  - name: auth
    description: Check a credential
  - name: agents
    description: Create and manage versioned agent configurations
  - name: models
    description: Discover models for agent authoring
  - name: provider_credentials
  - name: inbound_bindings
  - name: inbound_deliveries
  - name: environments
    description: Create and manage environments where agents run
  - name: sessions
    description: Run agents in sessions and follow their events
  - name: automations
    description: Run agents on a schedule or on demand and inspect their runs
  - name: artifacts
    description: Manage artifacts
  - name: artifact_data
    description: Manage the documents in an artifact's database
  - name: files
    description: Upload files to give to agents, and download files they produce
  - name: vaults
    description: Manage vaults and the credentials they hold
  - name: webhooks
    description: Manage outbound webhooks
  - name: memory_stores
    description: Manage memory stores
paths:
  /v1/sessions/{session_id}:
    get:
      tags:
        - sessions
      summary: Retrieve a session
      description: Retrieve a session by ID
      operationId: sessions.get
      parameters:
        - name: session_id
          in: path
          schema:
            type: string
            minLength: 1
            maxLength: 256
            description: Session ID
          required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    maxLength: 256
                  type:
                    type: string
                    enum:
                      - session
                  status:
                    type: string
                    enum:
                      - idle
                      - running
                      - terminated
                  runtime:
                    type: object
                    properties:
                      harness:
                        type: string
                        enum:
                          - pi
                          - deepseek
                          - opencode
                          - custom
                          - codex
                          - claude-code
                          - antigravity
                          - grok-build
                      model:
                        type: object
                        properties:
                          id:
                            type: string
                            minLength: 1
                        required:
                          - id
                        additionalProperties: false
                      generation:
                        type: integer
                        minimum: 1
                        maximum: 9007199254740991
                    required:
                      - harness
                      - model
                      - generation
                    additionalProperties: false
                  environment_id:
                    type: string
                  title:
                    anyOf:
                      - type: string
                      - type: 'null'
                  turn:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  usage:
                    type: object
                    properties:
                      input_tokens:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      output_tokens:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      cache_read_input_tokens:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      cache_creation_input_tokens:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      cache_creation:
                        type: object
                        properties:
                          ephemeral_5m_input_tokens:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          ephemeral_1h_input_tokens:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                        required:
                          - ephemeral_5m_input_tokens
                          - ephemeral_1h_input_tokens
                        additionalProperties: false
                    required:
                      - input_tokens
                      - output_tokens
                    additionalProperties: false
                  mcp_server_credentials:
                    type: array
                    items:
                      type: object
                      properties:
                        mcp_server_name:
                          type: string
                          minLength: 1
                          maxLength: 32
                          pattern: ^[A-Za-z0-9-]+(?:_[A-Za-z0-9-]+)*$
                        credential_id:
                          type: string
                          minLength: 1
                          maxLength: 256
                        vault_id:
                          type: string
                          minLength: 1
                          maxLength: 256
                      required:
                        - mcp_server_name
                        - credential_id
                      additionalProperties: false
                    maxItems: 40
                  machine_credentials:
                    type: array
                    items:
                      type: object
                      properties:
                        credential_id:
                          type: string
                          minLength: 1
                          maxLength: 256
                        vault_id:
                          type: string
                          minLength: 1
                          maxLength: 256
                        env:
                          anyOf:
                            - type: string
                              maxLength: 64
                              pattern: ^[A-Z_][A-Z0-9_]*$
                            - type: 'null'
                      required:
                        - credential_id
                        - vault_id
                        - env
                      additionalProperties: false
                    maxItems: 16
                    description: >-
                      Credentials the session's machine uses: requests from its
                      command line tools to a credential's targets are sent with
                      that credential, added outside the machine
                  created_at:
                    type: string
                  updated_at:
                    type: string
                  archived_at:
                    anyOf:
                      - type: string
                      - type: 'null'
                  agent:
                    type: object
                    properties:
                      id:
                        type: string
                        minLength: 1
                      type:
                        type: string
                        enum:
                          - agent
                      version:
                        type: integer
                        minimum: 1
                        maximum: 9007199254740991
                      name:
                        type: string
                        minLength: 1
                        maxLength: 256
                      harness:
                        type: string
                        minLength: 1
                      model:
                        type: object
                        properties:
                          id:
                            type: string
                            minLength: 1
                          provider_credential_id:
                            anyOf:
                              - type: string
                              - type: 'null'
                            description: >-
                              An inference credential for this agent's model.
                              Null uses deployment credentials.
                        required:
                          - id
                        additionalProperties: false
                      system:
                        anyOf:
                          - type: string
                            maxLength: 100000
                          - type: 'null'
                      description:
                        anyOf:
                          - type: string
                            maxLength: 2048
                          - type: 'null'
                      mcp_servers:
                        type: array
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - url
                            name:
                              type: string
                              minLength: 1
                              maxLength: 32
                              pattern: ^[A-Za-z0-9-]+(?:_[A-Za-z0-9-]+)*$
                            url:
                              type: string
                              minLength: 1
                              maxLength: 2048
                          required:
                            - type
                            - name
                            - url
                          additionalProperties: false
                        maxItems: 20
                      tools:
                        type: array
                        items:
                          anyOf:
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - mcp_toolset
                                mcp_server_name:
                                  type: string
                                  minLength: 1
                                  maxLength: 32
                                  pattern: ^[A-Za-z0-9-]+(?:_[A-Za-z0-9-]+)*$
                                default_config:
                                  type: object
                                  properties:
                                    enabled:
                                      type: boolean
                                      description: >-
                                        Set false to keep the tool out of the
                                        session. Unspecified tools are enabled
                                        by default.
                                    permission_policy:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - always_allow
                                            - always_ask
                                      required:
                                        - type
                                      additionalProperties: false
                                  additionalProperties: false
                                  description: >-
                                    Defaults for this server's tools. Named
                                    configs can override enabled and
                                    permission_policy independently. MCP tools
                                    are enabled and require confirmation by
                                    default.
                                configs:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      name:
                                        type: string
                                        minLength: 1
                                        maxLength: 128
                                      enabled:
                                        type: boolean
                                        description: >-
                                          Set false to keep the tool out of the
                                          session. Unspecified tools are enabled
                                          by default.
                                      permission_policy:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - always_allow
                                              - always_ask
                                        required:
                                          - type
                                        additionalProperties: false
                                    required:
                                      - name
                                    additionalProperties: false
                                  maxItems: 128
                              required:
                                - type
                                - mcp_server_name
                              additionalProperties: false
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - custom
                                name:
                                  type: string
                                  pattern: ^[A-Za-z0-9_-]{1,64}$
                                description:
                                  type: string
                                  minLength: 1
                                  maxLength: 4096
                                input_schema:
                                  type: object
                              required:
                                - type
                                - name
                                - description
                                - input_schema
                              additionalProperties: false
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - openapi_toolset
                                name:
                                  type: string
                                  minLength: 1
                                  maxLength: 32
                                  pattern: ^[A-Za-z0-9-]+(?:_[A-Za-z0-9-]+)*$
                                base_url:
                                  type: string
                                  maxLength: 2048
                                source:
                                  anyOf:
                                    - type: object
                                      properties:
                                        document_url:
                                          type: string
                                          maxLength: 2048
                                        include:
                                          type: object
                                          properties:
                                            operations:
                                              type: array
                                              items:
                                                type: string
                                                maxLength: 64
                                                pattern: ^[A-Za-z_][A-Za-z0-9_]*$
                                              maxItems: 256
                                            tags:
                                              type: array
                                              items:
                                                type: string
                                                minLength: 1
                                                maxLength: 128
                                              maxItems: 64
                                          additionalProperties: false
                                          description: >-
                                            Keeps only the operations with one of
                                            these names (operationId, or method and
                                            path when it has none) or tags.
                                        base_url:
                                          type: string
                                          maxLength: 2048
                                      required:
                                        - document_url
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        document_sha256:
                                          type: string
                                          pattern: ^[0-9a-f]{64}$
                                        include:
                                          type: object
                                          properties:
                                            operations:
                                              type: array
                                              items:
                                                type: string
                                                maxLength: 64
                                                pattern: ^[A-Za-z_][A-Za-z0-9_]*$
                                              maxItems: 256
                                            tags:
                                              type: array
                                              items:
                                                type: string
                                                minLength: 1
                                                maxLength: 128
                                              maxItems: 64
                                          additionalProperties: false
                                          description: >-
                                            Keeps only the operations with one of
                                            these names (operationId, or method and
                                            path when it has none) or tags.
                                        base_url:
                                          type: string
                                          maxLength: 2048
                                      required:
                                        - document_sha256
                                      additionalProperties: false
                                  description: >-
                                    What the operations were read from: the
                                    document_url, or the SHA-256 of the inline
                                    document's canonical JSON (keys sorted),
                                    with the include and base_url the request
                                    gave.
                                operations:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      name:
                                        type: string
                                        maxLength: 64
                                        pattern: ^[A-Za-z_][A-Za-z0-9_]*$
                                      description:
                                        type: string
                                        maxLength: 1024
                                      method:
                                        type: string
                                        enum:
                                          - get
                                          - put
                                          - post
                                          - delete
                                          - options
                                          - head
                                          - patch
                                      path:
                                        type: string
                                        maxLength: 2048
                                        pattern: ^\/[^?#]*$
                                      parameters:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            name:
                                              type: string
                                              minLength: 1
                                              maxLength: 256
                                            in:
                                              type: string
                                              enum:
                                                - path
                                                - query
                                                - header
                                            required:
                                              type: boolean
                                            style:
                                              type: string
                                              enum:
                                                - simple
                                                - form
                                                - spaceDelimited
                                                - pipeDelimited
                                                - deepObject
                                                - json
                                            explode:
                                              type: boolean
                                          required:
                                            - name
                                            - in
                                            - required
                                            - style
                                            - explode
                                          additionalProperties: false
                                        maxItems: 64
                                      body:
                                        type: object
                                        properties:
                                          content_type:
                                            type: string
                                            minLength: 1
                                            maxLength: 256
                                          required:
                                            type: boolean
                                        required:
                                          - content_type
                                          - required
                                        additionalProperties: false
                                      input_schema:
                                        type: object
                                      output_schema:
                                        type: object
                                    required:
                                      - name
                                      - description
                                      - method
                                      - path
                                      - parameters
                                      - input_schema
                                    additionalProperties: false
                                    description: >-
                                      One operation of the API, read from its
                                      document when the agent version was
                                      created. The agent calls it as
                                      mcp__<name>__<operation>.
                                  minItems: 1
                                  maxItems: 256
                                default_config:
                                  type: object
                                  properties:
                                    enabled:
                                      type: boolean
                                      description: >-
                                        Set false to keep the tool out of the
                                        session. Unspecified tools are enabled
                                        by default.
                                    permission_policy:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - always_allow
                                            - always_ask
                                      required:
                                        - type
                                      additionalProperties: false
                                  additionalProperties: false
                                  description: >-
                                    Defaults for this API’s operations. Named
                                    configs can override enabled and
                                    permission_policy independently. Operations
                                    are enabled and require confirmation by
                                    default.
                                configs:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      name:
                                        type: string
                                        minLength: 1
                                        maxLength: 128
                                      enabled:
                                        type: boolean
                                        description: >-
                                          Set false to keep the tool out of the
                                          session. Unspecified tools are enabled
                                          by default.
                                      permission_policy:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - always_allow
                                              - always_ask
                                        required:
                                          - type
                                        additionalProperties: false
                                    required:
                                      - name
                                    additionalProperties: false
                                  maxItems: 128
                              required:
                                - type
                                - name
                                - base_url
                                - operations
                              additionalProperties: false
                        maxItems: 104
                    required:
                      - id
                      - type
                      - version
                      - name
                      - harness
                      - model
                      - system
                      - description
                      - mcp_servers
                      - tools
                    additionalProperties: false
                    description: The pinned agent configuration used by the session.
                  resources:
                    type: array
                    items:
                      anyOf:
                        - type: object
                          properties:
                            id:
                              type: string
                              minLength: 1
                              maxLength: 256
                            type:
                              type: string
                              enum:
                                - github_repository
                            url:
                              type: string
                              maxLength: 1024
                              pattern: >-
                                ^https:\/\/github\.com\/[A-Za-z0-9](?:[A-Za-z0-9_-]*[A-Za-z0-9])?\/[A-Za-z0-9._-]+$
                            mount_path:
                              type: string
                              maxLength: 1024
                              pattern: >-
                                ^(?:\/(?:[^/\\.\u0000-\u001f\u007f-\u009f][^/\\\u0000-\u001f\u007f-\u009f]*|\.[^/\\.\u0000-\u001f\u007f-\u009f][^/\\\u0000-\u001f\u007f-\u009f]*|\.\.[^/\\\u0000-\u001f\u007f-\u009f]+))+$
                              allOf:
                                - pattern: ^\/workspace\/\S+$
                            checkout:
                              anyOf:
                                - type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - branch
                                    name:
                                      type: string
                                      minLength: 1
                                      maxLength: 255
                                  required:
                                    - type
                                    - name
                                  additionalProperties: false
                                - type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - commit
                                    sha:
                                      type: string
                                      pattern: ^[0-9a-f]{40}$
                                  required:
                                    - type
                                    - sha
                                  additionalProperties: false
                                - type: 'null'
                            access:
                              type: string
                              enum:
                                - read_write
                                - read_only
                            created_at:
                              type: string
                            updated_at:
                              type: string
                          required:
                            - id
                            - type
                            - url
                            - mount_path
                            - checkout
                            - access
                            - created_at
                            - updated_at
                          additionalProperties: false
                        - type: object
                          properties:
                            id:
                              type: string
                              minLength: 1
                              maxLength: 256
                            type:
                              type: string
                              enum:
                                - memory_store
                            memory_store_id:
                              type: string
                              minLength: 1
                              maxLength: 256
                            access:
                              type: string
                              enum:
                                - read_write
                                - read_only
                            instructions:
                              anyOf:
                                - type: string
                                  maxLength: 4096
                                - type: 'null'
                            name:
                              type: string
                            description:
                              type: string
                            mount_path:
                              type: string
                              maxLength: 1024
                              pattern: >-
                                ^(?:\/(?:[^/\\.\u0000-\u001f\u007f-\u009f][^/\\\u0000-\u001f\u007f-\u009f]*|\.[^/\\.\u0000-\u001f\u007f-\u009f][^/\\\u0000-\u001f\u007f-\u009f]*|\.\.[^/\\\u0000-\u001f\u007f-\u009f]+))+$
                              allOf:
                                - pattern: ^\/mnt\/memory\/[^/]+$
                            created_at:
                              type: string
                            updated_at:
                              type: string
                          required:
                            - id
                            - type
                            - memory_store_id
                            - access
                            - instructions
                            - name
                            - description
                            - mount_path
                            - created_at
                            - updated_at
                          additionalProperties: false
                        - type: object
                          properties:
                            id:
                              type: string
                              minLength: 1
                              maxLength: 256
                            type:
                              type: string
                              enum:
                                - artifact
                            artifact_id:
                              type: string
                              minLength: 1
                              maxLength: 256
                            version:
                              type: integer
                              minimum: 1
                              maximum: 9007199254740991
                            manifest:
                              type: string
                              minLength: 1
                              maxLength: 64
                            name:
                              type: string
                            mount_path:
                              type: string
                              maxLength: 1024
                              pattern: >-
                                ^(?:\/(?:[^/\\.\u0000-\u001f\u007f-\u009f][^/\\\u0000-\u001f\u007f-\u009f]*|\.[^/\\.\u0000-\u001f\u007f-\u009f][^/\\\u0000-\u001f\u007f-\u009f]*|\.\.[^/\\\u0000-\u001f\u007f-\u009f]+))+$
                              allOf:
                                - pattern: ^\/mnt\/artifacts\/[^/]+$
                            created_at:
                              type: string
                            updated_at:
                              type: string
                          required:
                            - id
                            - type
                            - artifact_id
                            - version
                            - manifest
                            - name
                            - mount_path
                            - created_at
                            - updated_at
                          additionalProperties: false
                        - type: object
                          properties:
                            id:
                              type: string
                              minLength: 1
                              maxLength: 256
                            type:
                              type: string
                              enum:
                                - skill
                            artifact_id:
                              type: string
                              minLength: 1
                              maxLength: 256
                            version:
                              type: integer
                              minimum: 1
                              maximum: 9007199254740991
                            manifest:
                              type: string
                              minLength: 1
                              maxLength: 64
                            name:
                              type: string
                            mount_path:
                              type: string
                              maxLength: 1024
                              pattern: >-
                                ^(?:\/(?:[^/\\.\u0000-\u001f\u007f-\u009f][^/\\\u0000-\u001f\u007f-\u009f]*|\.[^/\\.\u0000-\u001f\u007f-\u009f][^/\\\u0000-\u001f\u007f-\u009f]*|\.\.[^/\\\u0000-\u001f\u007f-\u009f]+))+$
                              allOf:
                                - pattern: ^\/mnt\/skills\/[^/]+$
                            description:
                              type: string
                              minLength: 1
                            created_at:
                              type: string
                            updated_at:
                              type: string
                          required:
                            - id
                            - type
                            - artifact_id
                            - version
                            - manifest
                            - name
                            - mount_path
                            - description
                            - created_at
                            - updated_at
                          additionalProperties: false
                        - type: object
                          properties:
                            id:
                              type: string
                              minLength: 1
                              maxLength: 256
                            type:
                              type: string
                              enum:
                                - file
                            file_id:
                              type: string
                              minLength: 1
                              maxLength: 256
                            size:
                              type: integer
                              minimum: 0
                              maximum: 9007199254740991
                            sha256:
                              type: string
                              minLength: 1
                              maxLength: 64
                            mount_path:
                              type: string
                              maxLength: 1024
                              pattern: >-
                                ^(?:\/(?:[^/\\.\u0000-\u001f\u007f-\u009f][^/\\\u0000-\u001f\u007f-\u009f]*|\.[^/\\.\u0000-\u001f\u007f-\u009f][^/\\\u0000-\u001f\u007f-\u009f]*|\.\.[^/\\\u0000-\u001f\u007f-\u009f]+))+$
                              allOf:
                                - pattern: ^\/mnt\/session\/uploads\/.+$
                            created_at:
                              type: string
                            updated_at:
                              type: string
                          required:
                            - id
                            - type
                            - file_id
                            - size
                            - sha256
                            - mount_path
                            - created_at
                            - updated_at
                          additionalProperties: false
                required:
                  - id
                  - type
                  - status
                  - environment_id
                  - title
                  - turn
                  - usage
                  - mcp_server_credentials
                  - machine_credentials
                  - created_at
                  - updated_at
                  - archived_at
                  - agent
                  - resources
                additionalProperties: false
        '400':
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - invalid_request_error
                      message:
                        type: string
                      code:
                        $ref: '#/components/schemas/ErrorCode'
                    required:
                      - type
                      - message
                    additionalProperties: false
                  request_id:
                    type: string
                    minLength: 1
                  accepted:
                    type: array
                  failed_index:
                    type: number
                  unconfirmed_index:
                    type: number
                required:
                  - type
                  - error
                  - request_id
                additionalProperties: false
        '401':
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - authentication_error
                      message:
                        type: string
                      code:
                        $ref: '#/components/schemas/ErrorCode'
                    required:
                      - type
                      - message
                    additionalProperties: false
                  request_id:
                    type: string
                    minLength: 1
                  accepted:
                    type: array
                  failed_index:
                    type: number
                  unconfirmed_index:
                    type: number
                required:
                  - type
                  - error
                  - request_id
                additionalProperties: false
        '404':
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - not_found_error
                      message:
                        type: string
                      code:
                        $ref: '#/components/schemas/ErrorCode'
                    required:
                      - type
                      - message
                    additionalProperties: false
                  request_id:
                    type: string
                    minLength: 1
                  accepted:
                    type: array
                  failed_index:
                    type: number
                  unconfirmed_index:
                    type: number
                required:
                  - type
                  - error
                  - request_id
                additionalProperties: false
        '409':
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - conflict_error
                      message:
                        type: string
                      code:
                        $ref: '#/components/schemas/ErrorCode'
                    required:
                      - type
                      - message
                    additionalProperties: false
                  request_id:
                    type: string
                    minLength: 1
                  accepted:
                    type: array
                  failed_index:
                    type: number
                  unconfirmed_index:
                    type: number
                required:
                  - type
                  - error
                  - request_id
                additionalProperties: false
        '429':
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - rate_limit_error
                      message:
                        type: string
                      code:
                        $ref: '#/components/schemas/ErrorCode'
                    required:
                      - type
                      - message
                    additionalProperties: false
                  request_id:
                    type: string
                    minLength: 1
                  accepted:
                    type: array
                  failed_index:
                    type: number
                  unconfirmed_index:
                    type: number
                required:
                  - type
                  - error
                  - request_id
                additionalProperties: false
        '500':
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - internal_error
                      message:
                        type: string
                      code:
                        $ref: '#/components/schemas/ErrorCode'
                    required:
                      - type
                      - message
                    additionalProperties: false
                  request_id:
                    type: string
                    minLength: 1
                  accepted:
                    type: array
                  failed_index:
                    type: number
                  unconfirmed_index:
                    type: number
                required:
                  - type
                  - error
                  - request_id
                additionalProperties: false
        '503':
          description: Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - service_unavailable
                      message:
                        type: string
                      code:
                        $ref: '#/components/schemas/ErrorCode'
                    required:
                      - type
                      - message
                    additionalProperties: false
                  request_id:
                    type: string
                    minLength: 1
                  accepted:
                    type: array
                  failed_index:
                    type: number
                  unconfirmed_index:
                    type: number
                required:
                  - type
                  - error
                  - request_id
                additionalProperties: false
      security:
        - bearer: []
        - apiKey: []
components:
  schemas:
    ErrorCode:
      type: string
      enum:
        - session_awaiting_action
        - idempotency_key_reused
        - agent_model_unavailable
        - automation_reference_unavailable
        - automation_memory_store_archived
        - automation_schedule_unusable
        - automation_capacity_reached
        - credential_url_taken
        - mcp_server_blocked
        - mcp_server_credential_invalid
        - mcp_server_credentials_ambiguous
        - machine_credential_invalid
  securitySchemes:
    bearer:
      type: http
      scheme: Bearer
    apiKey:
      type: apiKey
      name: x-api-key
      in: header

````

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