Read a day for a sleep
POST/api/v1/memory/sleep
In the SDKs: sleep_read · sleep
The raw text a sleep reads, a page at a time, with a receipt for each page.
Authentication
Every call carries your API key in an X-API-Key header. Keys are created in the console.
X-WOS-ModeloptionalPicks the memory model that answers. Omit it and Tablet 2 answers.
Request body
JSON, required. Out-of-range values are refused with a 400 rather than quietly clamped.
user_idstring requiredThe store to operate on. Stores are explicit: create one first or use the built-in "default". Use the id the store was created with: 1-64 ASCII letters, digits, ., _ or -, starting with a letter or digit. Ids that differ only by case name one store.
tz_offset_minutesintegerUTC offset in minutes; the store's time zone when absent.
days_agointeger 0–Which day: 0 is today.
roomstringOnly this room.
today_startstringWhen today begins (RFC 3339).
nowstringThe time to read up to (RFC 3339).
budget_tokensinteger 1–Page size in tokens.
cursorobjectThe cursor the last page returned.
include_supersededbooleanAlso read memories a later one replaced.
sleep_idstringThe sleep this page belongs to.
since_last_sleepbooleanStart where the last sleep ended.
sincestringStart here (RFC 3339).
Example
curl -X POST https://api.wontopos.com/api/v1/memory/sleep \
-H "X-API-Key: $WOS_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Status codes
| Status | Meaning |
|---|---|
| 200 | Success. |
| 400 | A field is missing or out of range; the message names it. |
| 401 | Missing or invalid API key. |
| 404 | Store (user_id) does not exist. Create it first: POST /api/v1/memory/collection. |
| 429 | Rate limited (per-account, per-tier RPM). Retry after the indicated delay. |
| 501 | Only Scroll 2 serves this endpoint. Send X-WOS-Model: scroll-2; the message names the model sent. |
Rate limits per tier and the full status list are in Errors & limits.
In the SDKs
The Python, TypeScript, and Rust SDKs wrap this endpoint so you do not build the request by
hand — pip install wontopos, npm i wontopos, or cargo add wontopos, then the method list is on the SDK reference. A coding agent can take the whole API in one file
at llms.txt, or over MCP with npx -y wontopos-mcp.