Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
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. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: Bernstein Task Server Bulletin 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: Bulletin
paths:
/bulletin:
post:
summary: Post Bulletin
description: 'Append a message to the bulletin board.
Returns 201 when the message is stored and any registered signal action
ran. When a signal action hook fails (for example a ``blocker`` whose
clearance gate did not materialize), the message is still on the
append-only board and queued in the board''s retry outbox, but the action is
not complete: the response is 202 rather than 201 so the caller can tell
"stored and acted on" from "stored, action pending retry" (#2648).'
operationId: post_bulletin_bulletin_post
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/BulletinPostRequest'
responses:
'201':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/BulletinMessageResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Bulletin
get:
summary: Get Bulletin
description: Get bulletin messages since a given timestamp.
operationId: get_bulletin_bulletin_get
parameters:
- name: since
in: query
required: false
schema:
type: number
default: 0
title: Since
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/BulletinMessageResponse'
title: Response Get Bulletin Bulletin Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Bulletin
/api/v1/bulletin:
post:
summary: Post Bulletin
description: 'Append a message to the bulletin board.
Returns 201 when the message is stored and any registered signal action
ran. When a signal action hook fails (for example a ``blocker`` whose
clearance gate did not materialize), the message is still on the
append-only board and queued in the board''s retry outbox, but the action is
not complete: the response is 202 rather than 201 so the caller can tell
"stored and acted on" from "stored, action pending retry" (#2648).'
operationId: post_bulletin_api_v1_bulletin_post
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/BulletinPostRequest'
responses:
'201':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/BulletinMessageResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Bulletin
get:
summary: Get Bulletin
description: Get bulletin messages since a given timestamp.
operationId: get_bulletin_api_v1_bulletin_get
parameters:
- name: since
in: query
required: false
schema:
type: number
default: 0
title: Since
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/BulletinMessageResponse'
title: Response Get Bulletin Api V1 Bulletin Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Bulletin
components:
schemas:
BulletinPostRequest:
properties:
agent_id:
type: string
title: Agent Id
type:
type: string
enum:
- alert
- blocker
- finding
- status
- dependency
title: Type
default: status
content:
type: string
title: Content
cell_id:
anyOf:
- type: string
- type: 'null'
title: Cell Id
type: object
required:
- agent_id
- content
title: BulletinPostRequest
description: Body for POST /bulletin.
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
BulletinMessageResponse:
properties:
agent_id:
type: string
title: Agent Id
type:
type: string
title: Type
content:
type: string
title: Content
timestamp:
type: number
title: Timestamp
cell_id:
anyOf:
- type: string
- type: 'null'
title: Cell Id
type: object
required:
- agent_id
- type
- content
- timestamp
- cell_id
title: BulletinMessageResponse
description: Single bulletin message in responses.