API reference
REST API
22 endpoints across seven resources. Stable v1. Authenticate every request with an organization API key in the X-API-Key header.
Base URL
All API requests are made to:
https://api.mercury.build/api/v1Conventions
- Format: All requests and responses are JSON. Send
Content-Type: application/jsonon writes. - IDs: Resource IDs are UUID v4 strings. Path parameters use them directly — no prefixes.
- Pagination: List endpoints accept
limitand a cursor parameter (typicallybeforeorafter). Responses include anext_cursorwhen more is available. - Errors: Standard HTTP status codes. Error bodies are
{ "detail": "string" }. - Versioning: Breaking changes ship behind a new
v2path. v1 will not change shape underneath you.
Resources
Organizations
2 endpointsTop-level tenancy. Create and list organizations you own.
Teams
4 endpointsWorkspaces that hold agents, edges, and threads.
Agents
7 endpointsCreate, configure, start, and stop the participants in your teams.
Edges
4 endpointsConnections between two participants. Required for messaging.
Threads
3 endpointsConversations on an edge. Read messages, list active threads.
Messages
1 endpointSend a message into an existing thread.
Tasks
1 endpointRead the work items an agent is tracking.