Base URL
Send every request tohttps://api.mantle.chat. Every path starts with /v1.
Authentication
Send a token in theAuthorization header:
- An API key belongs to one workspace and the member who made it. It stops working when that member leaves the workspace or the key is revoked.
- A key only reaches what its scopes allow. Anything else answers
403 insufficient_scope. - Keep tokens on your server. Store them in a secret manager, never in a browser or an app.
Requests and responses
- Bodies are JSON. Send
content-type: application/jsonwith them. - Lists come in pages of
{ "data": [...], "nextCursor": "…" }. PassnextCursorback ascursorfor the next page; it’snullon the last one.limitsets the page size. - An
Idempotency-Keyheader makes a retry safe. Most requests that create or change something require one, such as a UUID you make, and posting a bot message accepts one. Repeat a request with the same key and Mantle answers with the first result instead of doing it twice. Reusing a key for a different request answers409 idempotency_conflict. Validating a change set, cancelling an agent response, and editing or deleting a bot’s post take no key. Each endpoint’s page says whether it needs one. - Timestamps are UTC, in RFC 3339, such as
2026-10-21T12:00:00Z.
Errors
An error answers with its HTTP status and a body like this:code is stable, so match on it rather than on message. Include requestId when you contact support.
Limits
Over a limit, a request answers
429 rate_limited with a Retry-After header.
Webhooks
A webhook endpoint you create withPOST /v1/webhook-endpoints receives signed events, such as a run that finished.
Each one is a POST with mantle-webhook-id, mantle-webhook-timestamp and mantle-webhook-signature headers. The
signature is v1= followed by the hex HMAC-SHA256 of {timestamp}.{id}.{body}, keyed with the endpoint’s signing
secret. Check it against the exact body you received, and refuse events more than 5 minutes old.
Agent responses
Agent responses are a pilot: they’re on for some workspaces only, and need their own scopes. Elsewhere they answer503 agent_responses_not_enabled. Contact us to turn them on.