Bernstein Channel API

The Channel API from Bernstein — 8 operation(s) for channel.

Operations 8

POST /channel/query Post Channel Query #
POST /channel/{query_id}/respond Post Channel Response #
GET /channel/queries Get Channel Queries #
GET /channel/{query_id}/responses Get Channel Responses #
POST /api/v1/channel/query Post Channel Query #
POST /api/v1/channel/{query_id}/respond Post Channel Response #
GET /api/v1/channel/queries Get Channel Queries #
GET /api/v1/channel/{query_id}/responses Get Channel Responses #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/bernstein-run:bernstein-run-channel-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

bernstein-run-channel-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Bernstein Task Server Channel API
  description: 'Bernstein REST API - the open-source governance layer for AI agents, one git worktree per task.


    ## Authentication


    Authentication is ENABLED by default. Include a Bearer token in all requests:


    ```

    Authorization: Bearer

    ```


    To run without auth (development only), set `BERNSTEIN_AUTH_DISABLED=1` - this logs a loud warning and passes every request through.


    Public endpoints (no auth required): `/health`, `/health/ready`, `/health/live`, `/ready`, `/alive`, `/.well-known/agent.json`, `/docs`, `/openapi.json`, and the auth-flow endpoints (`/auth/login`, `/auth/oidc/callback`, etc.).


    Webhook and hook endpoints (`/webhook`, `/webhooks/*`, `/hooks/{session_id}`) authenticate via HMAC-SHA256 signatures - they do NOT accept Bearer tokens.


    ## Base URL


    Default: `http://127.0.0.1:8052`. Override with env vars `BERNSTEIN_HOST` and `BERNSTEIN_PORT`.


    ## Error Format


    All errors return JSON with a `detail` field:


    ```json

    {"detail": "Task not found: task-xyz"}

    ```


    | Status | Meaning |

    |--------|---------|

    | 400 | Bad request (validation error) |

    | 401 | Unauthorized (missing/invalid token) |

    | 403 | Forbidden (IP not in allowlist) |

    | 404 | Resource not found |

    | 409 | Conflict (task already in terminal state) |

    | 429 | Rate limited - respect the `Retry-After` header |

    | 500 | Internal server error |'
  version: 3.22.0
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  contact:
    name: Alex Chernysh
    url: https://github.com/sipyourdrink-ltd/bernstein
servers:
- url: http://{host}:{port}
  description: Task server started by the Bernstein CLI on the operator's own machine. There is no hosted instance; substitute the host and port of your install.
  variables:
    host:
      default: 127.0.0.1
      description: Interface the task server binds to. Loopback by default.
    port:
      default: '8052'
      description: Task server port. Override with BERNSTEIN_PORT.
tags:
- name: Channel
paths:
  /channel/query:
    post:
      summary: Post Channel Query
      description: Post a coordination query targeted at an agent or role.
      operationId: post_channel_query_channel_query_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChannelQueryRequest'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChannelQueryResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Channel
  /channel/{query_id}/respond:
    post:
      summary: Post Channel Response
      description: Respond to a channel query.
      operationId: post_channel_response_channel__query_id__respond_post
      parameters:
      - name: query_id
        in: path
        required: true
        schema:
          type: string
          title: Query Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChannelResponseRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChannelResponseResponse'
        '404':
          description: Query not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Channel
  /channel/queries:
    get:
      summary: Get Channel Queries
      description: Get pending queries, optionally filtered by agent_id or role.
      operationId: get_channel_queries_channel_queries_get
      parameters:
      - name: agent_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Agent Id
      - name: role
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Role
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ChannelQueryResponse'
                title: Response Get Channel Queries Channel Queries Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Channel
  /channel/{query_id}/responses:
    get:
      summary: Get Channel Responses
      description: Get all responses for a channel query.
      operationId: get_channel_responses_channel__query_id__responses_get
      parameters:
      - name: query_id
        in: path
        required: true
        schema:
          type: string
          title: Query Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ChannelResponseResponse'
                title: Response Get Channel Responses Channel  Query Id  Responses Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Channel
  /api/v1/channel/query:
    post:
      summary: Post Channel Query
      description: Post a coordination query targeted at an agent or role.
      operationId: post_channel_query_api_v1_channel_query_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChannelQueryRequest'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChannelQueryResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Channel
  /api/v1/channel/{query_id}/respond:
    post:
      summary: Post Channel Response
      description: Respond to a channel query.
      operationId: post_channel_response_api_v1_channel__query_id__respond_post
      parameters:
      - name: query_id
        in: path
        required: true
        schema:
          type: string
          title: Query Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChannelResponseRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChannelResponseResponse'
        '404':
          description: Query not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Channel
  /api/v1/channel/queries:
    get:
      summary: Get Channel Queries
      description: Get pending queries, optionally filtered by agent_id or role.
      operationId: get_channel_queries_api_v1_channel_queries_get
      parameters:
      - name: agent_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Agent Id
      - name: role
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Role
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ChannelQueryResponse'
                title: Response Get Channel Queries Api V1 Channel Queries Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Channel
  /api/v1/channel/{query_id}/responses:
    get:
      summary: Get Channel Responses
      description: Get all responses for a channel query.
      operationId: get_channel_responses_api_v1_channel__query_id__responses_get
      parameters:
      - name: query_id
        in: path
        required: true
        schema:
          type: string
          title: Query Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ChannelResponseResponse'
                title: Response Get Channel Responses Api V1 Channel  Query Id  Responses Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Channel
components:
  schemas:
    ChannelResponseResponse:
      properties:
        id:
          type: string
          title: Id
        query_id:
          type: string
          title: Query Id
        responder_agent:
          type: string
          title: Responder Agent
        content:
          type: string
          title: Content
        timestamp:
          type: number
          title: Timestamp
      type: object
      required:
      - id
      - query_id
      - responder_agent
      - content
      - timestamp
      title: ChannelResponseResponse
      description: Single channel response in API responses.
    ChannelQueryRequest:
      properties:
        sender_agent:
          type: string
          title: Sender Agent
        topic:
          type: string
          title: Topic
        content:
          type: string
          title: Content
        target_agent:
          anyOf:
          - type: string
          - type: 'null'
          title: Target Agent
        target_role:
          anyOf:
          - type: string
          - type: 'null'
          title: Target Role
        ttl_seconds:
          type: number
          title: Ttl Seconds
          default: 300
      type: object
      required:
      - sender_agent
      - topic
      - content
      title: ChannelQueryRequest
      description: Body for POST /channel/query.
    ChannelResponseRequest:
      properties:
        responder_agent:
          type: string
          title: Responder Agent
        content:
          type: string
          title: Content
      type: object
      required:
      - responder_agent
      - content
      title: ChannelResponseRequest
      description: Body for POST /channel/{query_id}/respond.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    ChannelQueryResponse:
      properties:
        id:
          type: string
          title: Id
        sender_agent:
          type: string
          title: Sender Agent
        topic:
          type: string
          title: Topic
        content:
          type: string
          title: Content
        target_agent:
          anyOf:
          - type: string
          - type: 'null'
          title: Target Agent
        target_role:
          anyOf:
          - type: string
          - type: 'null'
          title: Target Role
        timestamp:
          type: number
          title: Timestamp
        expires_at:
          type: number
          title: Expires At
        resolved:
          type: boolean
          title: Resolved
      type: object
      required:
      - id
      - sender_agent
      - topic
      - content
      - target_agent
      - target_role
      - timestamp
      - expires_at
      - resolved
      title: ChannelQueryResponse
      description: Single channel query in API responses.