Everything the portal and MCP tools do goes through the REST API. Use it for scripts, integrations, and anything a client cannot do over MCP.
#Base URL and schema
https://api.animawake.comThe full, generated reference is public:
- Swagger UI: api.animawake.com/api/docs/
- OpenAPI schema: api.animawake.com/api/schema/
This page covers the conventions the schema does not explain.
#Authentication
Send a key as a bearer token:
curl https://api.animawake.com/api/startup/ \
-H "Authorization: Bearer ent_your_key_here"Only the Authorization: Bearer header is accepted. Headers such as X-API-Key are ignored, and keys in query strings are never accepted.
#Key types
| Prefix | Acts as | Use it for |
|---|---|---|
ent_ |
One entity | Entity endpoints such as /api/moments/, /api/memory/search/, and /api/startup/. The key decides the entity, so these paths have no entity in them. |
usr_ |
You | Workspace and account endpoints under /api/families/<workspace>/..., with the same access you have in the portal. |
fam_ |
One workspace | Device endpoints. Issued to devices; you rarely need one. |
See Access tokens and keys for how to create, rotate, and revoke keys.
#Portal sessions
The portal authenticates with a session cookie. If you call the API from a browser session, send X-Animawake-Preflight: 1 on writes; it is required for requests with form, multipart, plain-text, or empty bodies. Two session endpoints also require an X-Animawake-Client header with any non-empty value: VRM upload (POST /api/vrm-library/) and VRM delete (DELETE /api/vrm-library/<id>/).
#URL shapes
- Entity endpoints:
/api/<resource>/, with anent_key. Examples:/api/moments/,/api/insights/,/api/decisions/,/api/sessions/,/api/memory/search/. - Workspace endpoints:
/api/families/<workspace-slug>/.... Examples:/api/families/<workspace>/entities/,/api/families/<workspace>/entities/<entity>/api-keys/. - Entity endpoints addressed through a workspace:
/api/families/<workspace-slug>/<entity-slug>/..., for exampleset-engine/andmemory/stats/.
In paths and in the API, a workspace is called a family.
#Examples
Load startup context:
curl https://api.animawake.com/api/startup/ \
-H "Authorization: Bearer ent_your_key_here"Record a moment:
curl -X POST https://api.animawake.com/api/moments/ \
-H "Authorization: Bearer ent_your_key_here" \
-H "Content-Type: application/json" \
-d '{"event": "Shipped the importer", "tags": ["MILESTONE"], "date": "2026-09-27"}'Search memory:
curl -X POST https://api.animawake.com/api/memory/search/ \
-H "Authorization: Bearer ent_your_key_here" \
-H "Content-Type: application/json" \
-d '{"query": "importer launch", "limit": 5}'limit is 1 to 100 (default 10). threshold is 0 to 3 (default 1.5); lower values return only closer matches.
#Search filters and the session archive
These parameters work on the fused read path only. Off it, a request that sets a filter or kinds answers 400 with {"error": "needs_fused_read_path", "parameters": [...]}, or with {"error": "pieces_off"} when it asks for pieces. The archive's pieces (the saved session text, cut into exchanges) are searched only when the request sends "include_pieces": true; the server's settings never add them. session, thread, speaker, kinds with piece and order date need it.
| Parameter | Value | What it does |
|---|---|---|
after, before |
YYYY-MM-DD |
Only memories from that day on, or up to it. UTC days, both ends included. Each store is narrowed by its own date. |
workspace |
a workspace name | Only pieces and saved sessions from that workspace. |
session |
8 to 36 hex characters | Only pieces and saved sessions of that session. Needs pieces. |
thread |
a thread id | Only pieces and saved sessions of that thread. Needs pieces. |
speaker |
owner, entity, worker or tool |
Only pieces with a message from that kind of speaker. Needs pieces. |
kinds |
a list of moment, insight, wisdom, conversation, decision, session, trace, piece |
Only these stores. piece needs pieces. |
include_pieces |
true or false |
Search the archive's pieces for this request. Without it, no pieces. |
order |
relevance (default) or date |
date reads pieces in time order, up to 20,000 characters of text. It needs "kinds": ["piece"] and at least one filter, and needs no query. |
A request that needs pieces when they are not included answers 400 with {"error": "pieces_off"}. With any filter set, the answer is {"results": [...], "filtered_by": [...]} instead of the bare list. A piece in the results has source_type piece, a short reference ref (r: and 8 hex characters), and content: its header line (date, workspace, session, thread, part, entity, speakers, and whether it is current or superseded), then the owner's question it answers (Answering: "...") when there is one, then the text.
curl -X POST https://api.animawake.com/api/memory/search/ \
-H "Authorization: Bearer ent_your_key_here" \
-H "Content-Type: application/json" \
-d '{"query": "importer launch", "after": "2026-11-01", "include_pieces": true}'Recall (POST /api/memory/ecphoric-recall/) takes include_pieces the same way: pieces beside the traces only when it is true.
#Searching the pieces alone
Available when ARCHIVE_PIECES_READ is on for the server, or with "include_pieces": true:
curl -X POST https://api.animawake.com/api/memory/pieces/search/ \
-H "Authorization: Bearer ent_your_key_here" \
-H "Content-Type: application/json" \
-d '{"query": "importer launch", "include_pieces": true}'It takes query (required) and the filters above (after, before, workspace, session, thread, speaker), and no limit, threshold, kinds or order. It returns {"groups": [[piece, ...], ...], "filtered_by": [...]}: whole pieces, best match first, up to about 8,500 characters of text in all; pieces next to each other in one session come as one group, in the order they happened, with the text two of them share shown once. Each piece has the search results' shape. Off the fused read path, or with pieces not included, it answers 400 with {"error": "pieces_off"}. It embeds the query, so it counts against the same hourly limit as search.
#Reading around a piece
Available when ARCHIVE_PIECES_READ is on for the server, or with include_pieces=true:
curl "https://api.animawake.com/api/memory/pieces/r:1a2b3c4d/around/?before=2&after=2&include_pieces=true" \
-H "Authorization: Bearer ent_your_key_here"It returns {"id": ..., "ref": ..., "pieces": [...]}: the piece, with up to before pieces before it and after after it in the same session, in the search results' shape. before and after default to 1; values are kept between 0 and 5. When the reference matches more than one piece, the answer is {"ambiguous": true, "matches": [...]}, each with its full ref; call again with a longer one (up to 32 hex characters). A reference that is not r: and 8 to 32 hex characters answers 400, and one that names no piece this key can see answers 404. Off the fused read path, or with pieces not included, it answers 400 with {"error": "pieces_off"}.
#Pagination
List endpoints are paginated by page number, 50 items per page:
curl "https://api.animawake.com/api/moments/?page=2" -H "Authorization: Bearer ent_your_key_here"{
"count": 134,
"next": "https://api.animawake.com/api/moments/?page=3",
"previous": "https://api.animawake.com/api/moments/?page=1",
"results": [ ... ]
}Follow next until it is null. Some endpoints return their own shape instead, such as {"tokens": [...]}; the schema shows each response.
#Errors
Errors use standard HTTP status codes and a JSON body with an error key:
{ "error": "Entity name does not match. Retirement cancelled." }Validation errors put field messages under error:
{ "error": { "name": ["This field is required."] } }A few endpoints return field messages at the top level, as {"query": ["This field is required."]}, or add extra keys next to error. Check error first, then fall back to the whole body.
| Status | Meaning |
|---|---|
400 |
The request is invalid. |
401 |
Returned by only a few endpoints when the key is missing or invalid. |
403 |
The key is missing, invalid, expired, or deactivated, or it is valid but not allowed to do this, for example a non-owner deciding a proposal. |
404 |
Not found, or not visible to this key. |
409 |
Conflicts with current state, for example a dream already running. |
429 |
Rate limited. See below. |
503 |
A dependency is unavailable, for example embeddings for search. |
#Rate limits
Limits apply per endpoint group, counted per entity, per user, or per IP address. A limited request returns 429:
{ "error": "Request was throttled. Expected available in 42 seconds." }| Endpoints | Limit | Counted per |
|---|---|---|
| Moments, insights, search, recall, trace creation and extraction, screenshots, relevant wisdom, and the memory graph (all share one budget) | 100 per hour | Entity (or user) |
| Feedback signals | 120 per minute | Entity (or user) |
| Entity backup download | 5 per hour | User |
| Dream requests | 4 per hour | Entity |
| Device heartbeats | 20 per minute | Device |
| Device link codes | 6 per minute | IP address |
| First wake conversation | 60 per hour | User |
| GitHub token requests | 60 per minute | Caller (entity or workspace key) |
| Discord bridge inbound messages | 120 per minute | The bridge (one shared budget) |
| Waitlist sign-up | 10 per hour | IP address |
Resonance checks (/api/memory/check-resonance/), reading traces and reading around a piece have no rate limit. The MCP server has separate limits; see Connection troubleshooting.
#Useful endpoints
| Task | Endpoint |
|---|---|
| Who does this key belong to? | GET /api/identity/whoami/ |
| Startup context | GET /api/startup/, or POST /api/startup/ecphoric/ with {"mode": "alive"} |
| Save a session | POST /api/session-end/ or POST /api/sessions/ |
| Steering rules as Markdown | GET /api/context-rules/ |
| Entity keys | GET, POST /api/families/<workspace>/entities/<entity>/api-keys/; DELETE .../api-keys/<id>/ |
| OAuth connections | GET /api/families/<workspace>/mcp-access/; DELETE .../mcp-access/<id>/ |
| Revoke all access | DELETE /api/families/<workspace>/entities/<entity>/revoke-all/ |
| Backup | GET /api/families/<workspace>/entities/<entity>/backup/ |
| OpenAI key | GET, POST, DELETE /api/families/<workspace>/integrations/openai/ |
| Proposals | /api/self-changes/proposals/, with approve/ and reject/ actions |
The MCP tools reference is also a guide to the entity endpoints: each tool is a thin wrapper around one or two of them.