REST API Overview
The Estuary REST API lets you manage characters, read conversation history, and query the memory system programmatically. All endpoints return JSON.
Base URL
https://api.estuary-ai.com
Authentication
Authenticate every request with an X-API-Key header:
curl https://api.estuary-ai.com/api/v1/characters \
-H "X-API-Key: est_your_api_key"
Generate API keys from the Estuary Dashboard under Settings > API Keys. See Authentication for details.
Keys carry scopes that decide which resources they can reach, for example
memories:read or characters:write. A key that lacks the scope a route needs
gets a 403 with "error": "insufficient_scope". See
API key scopes.
Player Scoping
The Characters and Character Generation APIs accept an optional X-Player-Id header. When present, operations are scoped to characters owned by that player. See Characters API -- Authentication & Player Scoping for the full rules.
Permanent Shares
The Shares API lets you mint permanent or expiring shareable links for a character. Permanent shares are designed for physical carriers (NFC tags, QR codes, print) and never expire. Once a recipient calls POST /api/v1/share/{id}/open, they receive a short-lived session token (sst_...) that the SDK uses in place of an API key.
Endpoints
:::info {id} is the character ID
Every path above uses the character's id, the value returned by the Characters API. Older routes spelled the same value agent_id.
:::
Migrating from the older routes
Estuary also serves a set of unversioned routes (/api/agents/...,
/api/generate/..., /api/encounters). They still work and are not going away
without a long notice period, but every one of them now has a canonical /api/v1
replacement. Responses from them carry Deprecation, Link and Sunset headers.
See the Legacy migration guide for the full mapping and the wire differences, which are mostly camelCase query parameters and a few changed status codes.
Pagination
List endpoints support limit and offset query parameters:
curl "https://api.estuary-ai.com/api/v1/characters?limit=10&offset=20" \
-H "X-API-Key: est_your_api_key"
Paginated responses include total, limit, and offset fields.
Errors
Error responses use standard HTTP status codes with a JSON body:
{
"detail": "Character not found"
}
| Status | Meaning |
|---|---|
400 | Bad request -- invalid parameters |
401 | Unauthorized -- missing or invalid API key |
403 | Forbidden -- not a member of the organization named in X-Org-Id, a player-scoped request on a developer-owned character, or a credential (such as a share session token) that cannot perform this operation |
404 | Not found -- resource doesn't exist or isn't owned by this account |
409 | Conflict -- the resource is busy or already in the requested state, for example a batch that is still running |
413 | Payload too large |
422 | Validation error -- detail lists the offending fields |
429 | Rate limit or quota exceeded -- honor the Retry-After header |
500 | Server error |
503 | Feature temporarily unavailable |