Skip to main content

API overview

The server implements a practical subset of the Claude Managed Agents HTTP API under /v1.

Supported surface

This reference documents repository behavior. Claude API coverage summarizes which integration workflows are supported, limited, or not supported.

Endpoints

ResourceEndpoints
AgentsPOST/GET /v1/agents, GET/POST /v1/agents/{id}, versions, archive
EnvironmentsPOST/GET /v1/environments, get, archive, delete
SessionsPOST/GET /v1/sessions, get, update, archive, delete
EventsPOST/GET /v1/sessions/{id}/events, SSE stream
OperationsGET /healthz, GET /readyz, GET /openapi.yaml

Resource-specific request shapes are covered in:

Headers

The default development server accepts requests without compatibility headers. Run with -strict to require them:

x-api-key: any-non-empty-value
anthropic-version: 2023-06-01
anthropic-beta: managed-agents-2026-04-01
content-type: application/json

authorization may replace x-api-key. Strict mode currently validates header presence and version/beta values; it is not a production authentication system.

Every response includes a request-id header. JSON request bodies are limited to 32 MiB and unknown top-level fields are rejected.

Errors

Errors use a Claude-compatible envelope:

{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "name is required"
},
"request_id": "req_..."
}
HTTP statusCurrent error type
400invalid_request_error
401authentication_error
404not_found_error
409conflict_error
413request_too_large
422invalid_request_error
500api_error

These mappings are Mango's public contract for the supported API subset. See the compatibility matrix for parity limits.

Pagination

Session and event lists use opaque page tokens. A cursor is bound to its resource, sort order, and normalized filters. Reusing it with different filters returns 400.

List responses use data and nullable cursor fields:

{
"data": [],
"next_page": null
}

Session lists also include prev_page. Agent listing is currently single-page and always returns next_page: null.

OpenAPI

The running server exposes /openapi.yaml, sourced from internal/httpapi/openapi.yaml. It is currently an endpoint inventory, not a complete generated client contract: schemas, examples, parameter definitions, and the full event union still need to be added.

For now, use these guides and the API coverage page when integrating.