API error reference
Every error from the current API (/api/v2/, including /bulk and /changes) answers in one envelope. A response with a non-2xx status has this body:
{
"error": {
"type": "invalid_request",
"code": "invalid_link",
"message": "friends references Character '0123…' which does not exist.",
"param": "friends",
"doc_url": "https://onlyworlds.github.io/api/errors/#invalid_link"
}
}| Field | Meaning |
|---|---|
type |
The error family, one of a fixed set: invalid_request, authentication_error, permission_error, not_found, rate_limited, idempotency_error, api_error. It names the family only: one family holds codes with different statuses and different fixes |
code |
The specific, stable identifier. Decide what to do from this, never from type |
message |
Human-readable and safe to log or show. Its wording may change: do not parse it |
param |
The field or query parameter at fault, when there is one; otherwise null |
doc_url |
This page, at the code’s section (#<code>) |
Each code has its own section below, and the summary table lists them all. A fetch of this page gets every section; each code’s section has the id <code>, so doc_url’s #<code> lands on it. The same page as Markdown is at /api/errors.md, where each section is the heading ### <code>. In /bulk, each failed item carries this same envelope: see Bulk errors. An MCP tool reports a refusal as a tool error whose text is this same envelope as JSON, with retry_after (seconds) beside it on a 429 and current on a 412; the MCP server’s own argument errors (an unknown type, a bad limit, no key) stay plain sentences.
Some errors carry extra top-level keys beside error, named in their row: precondition_failed carries current, the element as it is now, and gone carries the deletion’s change_seq and deleted_at. Read the body whole; the envelope is not a closed shape.
Error codes
Section titled “Error codes”Each code belongs to one family, its type, and a family’s codes do not share one status or one fix: the figure groups them, and the table under it says what each one means.
69 error codes in 7 families. Decide from the code, never the family: the invalid_request family alone answers with 5 statuses (400, 409, 412, 413, 422).
authentication_error3 codes · who are you · 401
permission_error18 codes · you may not · 403
invalid_request33 codes · what you sent · 400, 409, 412, 413, 422
- id_conflict
- resync_required
- already_member
- removal_in_flight (answers with Retry-After)
- upload_pending (answers with Retry-After)
- pin_required
- stale_proposal
- handover_refused (also answers 422)
- invalid_request
- player_role_fixed
- character_hidden
- seat_follows_sponsor
- seat_above_sponsor
- not_a_lens
- lens_is_template
- lens_hidden
- character_played
- known_of_not_writable
- served_trimmed_not_writable
- review_mark_empty
- character_taken
- world_full
- field_not_visible
- too_many_open
- not_proposed
- handover_refused (also answers 409)
- apply_failed
- answer_not_parsed
- own_key_refused
idempotency_error2 codes · the same key twice · 409
- idempotency_error
- idempotency_in_flight (answers with Retry-After)
rate_limited5 codes · too fast or too much · 429
- rate_limited (answers with Retry-After)
- quota_exceeded (answers with Retry-After)
- use_ceiling (answers with Retry-After)
- use_in_flight (answers with Retry-After)
- too_many_requests (answers with Retry-After)
api_error6 codes · on our side · 413, 500, 502, 503
↻the answer carries Retry-After: wait that many seconds, then retry (9 codes)4xx fix the request · 5xx on our side
The upload host, upload.onlyworlds.com, is not part of the API: it answers in its own shape, with its own 15 codes (statuses 400, 401, 403, 405, 409, 411, 413, 415, 502, 503), listed under Upload host errors.
| Code | Type | Status | What happened |
|---|---|---|---|
invalid_request |
invalid_request |
422 |
The body or query is malformed: an unknown field or query parameter, a bad value, or a wrong-shaped payload; param names the culprit. |
invalid_link |
invalid_request |
400 |
A link field names an element that does not exist in this world (or among a /bulk batch’s surviving items). |
id_conflict |
invalid_request |
409 |
A create supplied an id that already exists, in this world or another (element ids are unique across all worlds), or an id a membership already holds (a member’s or a seat’s, in any world, a removed member’s too). |
resync_required |
invalid_request |
409 |
A guest’s, or (with the hidden mark on) a contributor’s, /changes cursor predates a change to what it can see, or is not this caller’s cursor shape: pull again from since=0. With the hidden mark on, the envelope’s reason says why: role (your own role or membership moved: keep what the new walk does not name) or view (what you may see moved: drop it). |
already_member |
invalid_request |
409 |
The invite names someone who is already a member, or the accepting account already is one; the envelope’s world_id names the world. A join code the caller’s own account already used answers this too, so a lost answer is read by sending the code again. |
removal_in_flight |
invalid_request |
409 |
A removal ticket for this image was issued less than 10 minutes ago and is not yet spent; use it, or retry after Retry-After. |
upload_pending |
invalid_request |
409 |
No image is recorded under this key yet, but an upload ticket in this world is still open and unreported (the upload may have just finished); retry after Retry-After (2 s). The platform cannot tell which key an open ticket will get, so any key answers this while the caller holds one, until it expires; then not_found. |
pin_required |
invalid_request |
409 |
A member without an account PIN tried to mint a write key. Accepting an invite or a link needs no PIN. |
precondition_failed |
invalid_request |
412 |
The request carried If-Match with a change_seq, and the element has moved since; the reply’s top-level current is the element as it is now. Nothing was written and nothing is merged: re-read current, then re-send or ask the user. |
player_role_fixed |
invalid_request |
422 |
The owner tried to change a player seat’s role: a player (no account) reads as a guest, and that role can’t be changed. Remove the player instead. |
character_hidden |
invalid_request |
422 |
The owner tried to set a hidden Character as the one a seat or a player plays (param character): a played Character is on every reader’s roster, so a hidden one can never be picked. Unhide it first, or pick another. |
seat_follows_sponsor |
invalid_request |
422 |
The owner tried to set the Character of an AI seat its member made to play their own (param character): it plays what that member plays, and may change it only while they may. Hand the seat to yourself first (sponsor owner), then pick. |
seat_above_sponsor |
invalid_request |
422 |
The owner tried to set an AI seat’s role above the role of the person who answers for it (param role), or any role above its own while that person is no member of the world: a seat is never above its sponsor. Hand the seat to yourself first (sponsor owner), then raise it. |
not_a_lens |
invalid_request |
422 |
A seat chose a Construct that is no lens (param lenses): a lens is a Construct with supertype Lens (the lens profile, profiles/lens.md). |
lens_is_template |
invalid_request |
422 |
A seat chose a template (param lenses): a lens with subtype Template reads nothing until it is copied and pointed. Choose a lens with anchors. |
lens_hidden |
invalid_request |
422 |
A seat chose a hidden lens (param lenses): a seat’s lenses are on the members list every reader of the world reads, so a hidden one can never be chosen. Unhide it first. |
character_played |
invalid_request |
422 |
A delete named a Character someone plays on the roster: the world’s owner_character or a live member’s Character (param id); the message says who, never by email or username. Nothing was deleted. Re-point that member to another Character, or remove the member, then delete. |
known_of_not_writable |
invalid_request |
422 |
A write body carried known_of (param known_of): that key marks a stub, an element the reader knows of but does not see whole, and is never written. A stub sent back would blank every field it leaves out: drop known_of and send only the fields you mean to change. |
served_trimmed_not_writable |
invalid_request |
422 |
A write body carried x_served_trimmed (param x_served_trimmed): the server adds that key to a message it serves with recipients or a sender hidden from the reader, and to a lens it serves with an anchor hidden from the reader, and it is never written. Drop it and send only the fields you mean to change. |
review_mark_empty |
invalid_request |
422 |
A write carried an empty x_review_proposed (param x_review_proposed): an empty string, one of whitespace only, [] or {}. The review mark is read by presence, so an empty one marks nothing and is never stored; send the mark as an object (by, evidence, expires), or null to clear it. On every element write, /bulk item by item. |
character_taken |
invalid_request |
422 |
A player picked a Character from a party link’s list that a live seat in the world already plays (param character): pick another from the list. The preview marks each listed Character taken. |
world_full |
invalid_request |
422 |
A player link was opened in a world that already has its 50 live players: nothing was spent, and the link works again once the owner removes a player. |
field_not_visible |
invalid_request |
422 |
A proposal named a field the proposer’s own view of the element does not hold (param names it): the element reaches this reader only as a stub (known_of), and a proposal changes only what its proposer can read. |
too_many_open |
invalid_request |
422 |
A proposer already has 5 open proposals on this element, or 50 in this world: wait for a keeper to decide, or withdraw one. A lapsed proposal no longer counts. |
stale_proposal |
invalid_request |
409 |
An accept found that a field the proposal names has moved since it was made. Beside the envelope, conflicts lists each moved field with its base and current values, and current is the element as it is now. Nothing was written and the proposal stays open; the proposer proposes again on the current text. |
not_proposed |
invalid_request |
422 |
A review (accept or decline of a new element written as proposed) named an element that carries no x_review_proposed mark: nothing to settle. A change to an existing element is proposed and decided through its proposals instead. |
handover_refused |
invalid_request |
409, 422 |
POST /account/worlds/handover refused an item, so nothing was written: not the world, not its elements, not the account PIN. Beside the envelope, items holds each item’s result, the refused ones with their error. 409 when an id is held in another world (that slot says id_conflict: give it a new id), else 422. |
apply_failed |
invalid_request |
422 |
A /bulk item passed validation but its write failed a database constraint (most often an id that already exists in another world). |
invalid_grant |
invalid_request |
400 |
Sign in with OnlyWorlds: the code cannot be exchanged (POST /api/v2/auth/token). It is unknown, already used, expired (a code lives 60 seconds), or was issued for another client, another redirect_uri or another code_verifier. One answer for every case, byte for byte, and the code is spent either way: start the sign-in again. |
one_credential |
invalid_request |
400 |
A read sent both an API-Key and an account token (Authorization: Bearer ow_a_...). Send one: the key reads its own world, the token reads the world world names as your own access there. |
file_too_large |
invalid_request |
413 |
A file asked to be attached to an element is over 25 MB; the message gives both sizes (param size). |
invalid_credentials |
authentication_error |
401 |
The API key or PIN is missing, unrecognised or wrong. A PIN refusal names param API-Pin and says whether the PIN was missing or wrong. |
key_revoked |
authentication_error |
401 |
The API key was recognised but has been revoked. |
wrong_audience |
authentication_error |
401 |
The account token is a hosted client’s, for the MCP server at /mcp only, or an AI door token, for GET /account/ai and the uses it names only: every other route refuses it. |
permission_error |
permission_error |
403 |
The credential is valid but lacks the scope for this route (e.g. a read key on a write route). |
csrf_required |
permission_error |
403 |
A write (POST, PUT, PATCH, DELETE) to an /account route signed in only by the site’s own session cookie came without Django’s CSRF token: the page sends the csrftoken cookie’s value in the X-CSRFToken header (or the csrfmiddlewaretoken form field). Nothing was written. An ow_a_ token or an X-Session-Token needs no CSRF token. |
use_not_granted |
permission_error |
403 |
An AI door token called a use it was not minted for (param use): it opens only the uses it names. Mint one that names this use, or call with an account credential. Nothing was counted. |
not_author |
permission_error |
403 |
A contributor or guest key changed, replaced, relinked or deleted an element someone else created. |
not_reader |
permission_error |
403 |
A key wrote a Read mark (a Relation whose supertype is Read, the message profile’s record of what one reader has read) that is not its own, or a write would make someone else’s Relation one: a Read mark is written only by the reader whose mark it is, the world’s owner and its co-builders included. The reader adds to its own mark with POST /api/v2/account/worlds/{world_id}/read. |
narratives_only |
permission_error |
403 |
In a world where AI seats propose and a person accepts, an AI seat sent its own Read mark more than its list of read messages, and nothing was written: a PATCH or a link edit takes only narratives, a PUT of an existing mark only a change to narratives, and a new mark only narratives with the name and the Character the message gives. |
hidden_not_allowed |
permission_error |
403 |
A create (POST, a PUT of a new id, a /bulk item that creates) carried hidden: true from a key that may not hide: only the world’s owner and its co-builders (person or seat) may. Nothing was created. Leave hidden out, or ask a keeper. |
keeper_only |
permission_error |
403 |
A key that is not a keeper’s (a contributor’s, a guest’s or a seat’s below co-builder) set, changed or removed x_charter_of on an element of any type (the mark that makes a Charter, a Guide or a Domain the world’s reading aid); or changed, relinked or deleted a Law that carries it or an Object such a Law’s text names, its own included; or added a file to such an element or removed one from it; or created an Object under an id such a text names. Nothing was written. keeper_only never refuses the owner’s own keys or a co-builder’s; sending the mark unchanged passes. |
review_by_another |
permission_error |
403 |
A key below co-builder (a contributor’s or a guest’s, a person’s or a seat’s) wrote a review mark, x_review_proposed or x_review_checked (param names which), with a by that is not its own: below co-builder, a mark with a by is either the mark exactly as the element holds it (the same JSON value: every key and value, numbers by value, so 1 and 1.0 are one and true is never 1) or the writer’s own, by its membership id exactly as GET /me gives it (another spelling of that id is refused). Nothing was written. Send your own membership id as by, exactly as GET /me gives it, or send the mark exactly as the element holds it now (read the element again if it changed since). null, a mark with no by, and every write by the owner’s keys or a co-builder’s pass. On every element write and proposal, /bulk item by item. |
owner_only |
permission_error |
403 |
A member key tried to change the world’s own settings (a co-builder may change every writable field but owner_character, and nothing the route does not take: the public switch stays the owner’s). |
not_co_builder |
permission_error |
403 |
A key that is not a co-builder’s (a contributor’s, a guest’s, a player’s, or the owner’s own keys) called /links: the world’s invite links over a world key are a co-builder’s; the owner mints them through the account. |
read_as_owner_only |
permission_error |
403 |
A key or token sent read_as to GET /world/{world_id}/lenses naming a reader whose lenses it may not set: the owner reads as any reader; a co-builder or a seat’s sponsor reads as that seat only. |
view_as_owner_only |
permission_error |
403 |
A member key sent as (view as): reading as another reader is the owner’s, from a key with no member. |
guest_not_supported |
permission_error |
403 |
A guest key called a route guests cannot use yet, or wrote a note (Narrative) without a Character of its own in the world. |
proposed_only |
permission_error |
403 |
The world takes an AI seat’s writes as proposals (its owner’s setting), and this act has no proposal form: a seat deleting an element it did not create, or accepting or declining a proposal. Propose instead, or ask a keeper. Also, on any world, a member accepting or declining a new element whose mark names it: a keeper settles it. |
own_proposal |
permission_error |
403 |
A keeper tried to accept their own proposal: another keeper (the world’s owner or a co-builder) decides it. |
storage_full |
permission_error |
403 |
The account the upload counts against has used all of its image storage. |
files_full |
permission_error |
403 |
The world’s files have no room for this one (250 MB a world); the message gives the world’s use, its cap and the file’s size. Remove a file, or ask the owner. |
not_found |
not_found |
404 |
The element or route does not exist in this world. |
gone |
not_found |
410 |
The element was deleted from this world; the body carries the deletion’s change_seq and deleted_at beside the envelope (GET of one element only). |
rate_limited |
rate_limited |
429 |
Too many failed PIN attempts: ten different wrong PINs within fifteen minutes, counted on the key and across every key of the account whose PIN it is (a world’s PIN is its owner’s; a member’s key takes the member’s own; an AI seat’s secret counts on its key alone; the practice world’s PIN, published, counts on nothing), refuse every PIN there until the oldest is fifteen minutes old (param names where the PIN was sent, as the 401 does: API-Pin, or pin on the account routes); the same wrong PIN sent again counts once; or too many sign-in attempts from one address (the password sign-in and POST /api/v2/auth/token share one count); retry after the Retry-After header’s seconds. |
quota_exceeded |
rate_limited |
429 |
A daily limit is used up (the world’s image upload tickets, its file upload tickets, or the account’s token rating for AI); retry after Retry-After. |
use_ceiling |
rate_limited |
429 |
This account has made today’s calls to this AI use (param use): its daily ceiling is reached; retry after Retry-After (midnight UTC). Nothing was counted. A saved AI key does not lift it: the limit is the use’s, not the token rating’s. |
use_in_flight |
rate_limited |
429 |
Another call to this AI use (param use) is still running for this account: a use allows one at a time. Retry after Retry-After (a few seconds); nothing was counted. |
too_many_requests |
rate_limited |
429 |
Over the request budget: 300 requests a minute per key or account token, 60 a minute per address for a request with neither, reads and writes together (a /bulk call is one request); retry after Retry-After. Every reply carries RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset. |
idempotency_error |
idempotency_error |
409 |
An Idempotency-Key was reused with a different request body. |
idempotency_in_flight |
idempotency_error |
409 |
A request with this Idempotency-Key is still running; retry after Retry-After (1 s): once it has answered, the same key and body replay its answer. |
api_error |
api_error |
500 |
An unexpected server-side error; the envelope is kept even here. |
ask_failed |
api_error |
502 |
The AI proxy could not get an answer from the model; try again in a moment. Nothing was counted. |
ask_unavailable |
api_error |
503 |
Asking your world is not switched on for this server, or is paused for the day (the server-wide cap); nothing was counted. With param use: this AI use is switched off, or has spent its own budget for today. |
answer_not_parsed |
invalid_request |
422 |
The AI use’s model answered, but not in the shape the use promises (param answer), and asked again gave no usable answer either: the provider billed the answers, so they count against the use’s budget, not the account’s token rating (or the account’s own AI key paid them); the text is not returned. The error’s refusals lists each refused answer’s word, stop reason and output tokens, never its text. A retry under the same Idempotency-Key replays this answer. Carry out your own fallback. |
own_key_refused |
invalid_request |
422 |
Today’s token rating is spent and the call ran on the account’s own AI key, which its provider refused (a key revoked, wrong or out of credit). Nothing was counted and the call was not retried on the platform’s key; the account page shows the refusal’s date. Check or replace the key on the account page. |
server_busy |
api_error |
503 |
Every request slot stayed full for 10 seconds; retry after Retry-After. |
payload_too_large |
api_error |
413 |
The request body is over 2.5 MB; split a large /bulk into several calls. |
media_unavailable |
api_error |
503 |
Image or file upload is not configured on the server right now. |
invalid_request
Section titled “invalid_request”Type invalid_request · Status 422
The request body or query is malformed: an unknown field, a server-managed field in a write, an unknown query parameter, a value that fails validation, text over its length limit, extension fields over the size cap, a malformed id, or a wrong-shaped payload.
- Common cause: a misspelled field name (
freinds); a_idsor_idsuffix carried over from the Classic API (the current API uses bare link names); an unknown query parameter, such as a mistyped filter (nmae__icontains) or?ordering=; sending a read body back withtype,created_at,updated_atorchange_seqstill in it; a bulk request whoseitemsis not an array. - How to fix: read
param: it names the field or parameter at fault. Correct the spelling, drop the suffix or the server field, or remove the parameter. The list filters arename,name__icontains,supertype,subtype,idsandcreated_by, pluscharacterson the six element types with that link, and each element type’s single links (?parent_location=<id>; the422’s message lists the type’s own filters, Filters); the other accepted parameters arelimit,cursor,expand,fields,asandworld. Any other query parameter is rejected, never ignored. - A
fieldslist with unknown names (paramfields) is refused once for the whole list, and the error carries three keys beside the usual five:unknown_fields(every name the element type does not have, in the order sent),types_with_field(for each one another element type has, those types) andallowed_fields(the names this type takes). Send the list again from those (Expansion and sparse fields). The TypeScript SDK reads the three aserr.fieldsRefusal(from 4.179.0), the Python package asApiError.fields_refusal(from 0.134.0).
Unknown fields are a hard error, not a silent drop, so a mistyped field name fails loudly instead of vanishing. Fields under the extension namespaces atlas_*, shadow_* and x_* are the exception: they are stored as written.
invalid_link
Section titled “invalid_link”Type invalid_request · Status 400
A link field names a UUID that is not an element of the linked element type in this world.
- Common cause: linking to an element that was never created, was deleted, or whose UUID was mistyped. An element deleted in the same moment as your write counts too: the write is refused rather than stored with a link to nothing. An id of an element of another element type (a Location’s id in
friends, which holds Characters). In/bulk, linking to a sibling item that itself failed. For a guest key, linking to an element the guest cannot see; for any key, linking to an element hidden from it. - How to fix: check that the referenced element exists and is of the element type the field names (read it first, or include it in the same
/bulkbatch). Links in a batch are checked against the world plus the batch’s surviving items, in any order, but an item that fails cannot be linked to.paramnames the link field.
A single write that fails with invalid_link writes nothing, so after fixing the link you can retry it with the same element id. A dangling link is an explicit, named error. The Classic API’s old behaviour of silently dropping it does not apply here.
invalid_grant
Section titled “invalid_grant”Type invalid_request · Status 400
Sign in with OnlyWorlds: the code cannot be exchanged at POST /api/v2/auth/token. It is unknown, already used, expired, or was issued for another client_id, redirect_uri or code_verifier. The body is the same for every case, byte for byte, and the code is spent either way.
- Common cause: a page reload that sent the code a second time; a code older than 60 seconds; a
redirect_urithat differs from the authorize request’s by a trailing slash or a query; a verifier from another sign-in. - How to fix: start the sign-in again from the tool’s button. Take
codeout of the address bar before the exchange, and send the exchange once, before any other request. A code sent a second time also revokes the token its first exchange minted.
lens_hidden
Section titled “lens_hidden”Type invalid_request · Status 422
A seat chose a hidden lens (param lenses) in PUT /api/v2/me/lenses or the account member route. A seat’s lenses are on the members list every reader of the world reads, so a hidden lens can never be chosen. Nothing was written.
- How to fix: unhide the lens first, or choose another.
lens_is_template
Section titled “lens_is_template”Type invalid_request · Status 422
A seat chose a template (param lenses): a lens with subtype Template has no anchors and reads nothing until it is copied and pointed at this world’s things (lenses). Nothing was written.
- How to fix: copy the template into a lens with anchors, and choose that one.
not_a_lens
Section titled “not_a_lens”Type invalid_request · Status 422
A seat chose an id that is no lens (param lenses): a lens is a Construct with supertype Lens (lenses). Nothing was written.
- How to fix: send only lens ids;
GET /api/v2/world/{world_id}/lenseslists the ones you can see.
one_credential
Section titled “one_credential”Type invalid_request · Status 400
A read sent both an API-Key and an account token (Authorization: Bearer ow_a_…). The server picks neither: a world key reads its own world, and an account token reads the world world names as your own access there.
- Common cause: a client that sets a default
API-Keyheader on every request and adds the user’s account token after they sign in. - How to fix: send one. Drop the
API-Keyto read as the signed-in account, or drop theAuthorizationheader to read with the key.
id_conflict
Section titled “id_conflict”Type invalid_request · Status 409
A POST, a creating PUT or a /bulk item supplied an id another element already holds: one of the same type, one of another type in this world (since 2026-10-29), or one in another world. Element ids are unique across all worlds and every type, so the message says which case it is, and names the type when this world holds the id as another one you can see. Since 2026-11-11 an element also never takes an id a membership holds (a member’s or a seat’s, in any world, a removed member’s too): that create is refused the same way, param id, and the message says only that the id is in use and to give the element a new one. An element that already exists keeps its id.
- Common cause: retrying a create with a client-minted UUID that already landed, reusing ids copied from another world, or minting the same id for two elements of different types.
- How to fix: if the id exists in this world as this type, use
PUT /api/v2/{type}/{id}, the upsert:POSTonly creates. If this world holds it as another type,PUTit as that type, or mint a new id. If it exists in another world, or a membership holds it, mint a new id. To retry a request that may have completed, send anIdempotency-Keyheader instead of posting again.
handover_refused
Section titled “handover_refused”Type invalid_request · Status 409 or 422
POST /api/v2/account/worlds/handover (a world with its first elements) refused one of its items, so nothing was written: not the world, not its elements, not the account PIN. Beside the error, items holds each item’s result, and the refused ones carry their own error.
409: an item’sidis held in another world, or by a membership (since 2026-11-11); that slot saysid_conflict. Give it a new id and send the whole call again.422: any other refusal, named in the slot that failed.- A retry after a lost answer meets
409on every id, because they landed in the first world: that world is under the account’s worlds (GET /api/v2/account/worlds). Since 2026-11-07 the route takes anIdempotency-Key: send one, and the same key and body answer the first201again, the one world.
precondition_failed
Section titled “precondition_failed”Type invalid_request · Status 412
A PATCH, a link operation or a DELETE carried If-Match with a change_seq, and the element has changed since. Nothing was written and nothing is merged. The reply carries, beside the error, a top-level current: the element as it is now, as this caller sees it.
- Common cause: an edit made offline or from a stale copy, while another client (Atlas, a plugin, an agent) changed the same element.
- How to fix: read
current. If the fields you changed are not the ones that moved, re-send yourPATCHwithcurrent.change_seqinIf-Match. If the same field moved on both sides, ask the user which version to keep. See Only if unchanged.
read_as_owner_only
Section titled “read_as_owner_only”Type permission_error · Status 403
A key or token sent read_as to GET /api/v2/world/{world_id}/lenses naming a reader whose lenses it may not set. The owner reads as any reader; a co-builder, or the account that sponsors an agent’s or a player’s seat, reads as that seat only.
- How to fix: leave
read_asout; the answer is then your own reading.
stale_proposal
Section titled “stale_proposal”Type invalid_request · Status 409
An accept of a proposal found that a field the proposal would set has changed since the proposal was made. Nothing was written. The reply carries conflicts, one {field, base, current} per moved proposed field, and the element under a top-level current. A change elsewhere on the element does not cause this: only a proposed field that moved.
- Common cause: the element was edited, or another proposal on the same field was accepted, between the proposal and its accept.
- How to fix: read
conflicts. Decline the row, or ask the proposer for a fresh one made against the element as it is now.
own_proposal
Section titled “own_proposal”Type permission_error · Status 403
A keeper tried to accept their own proposal. A proposal is accepted by someone other than its proposer: the owner or a co-builder who did not make it.
- How to fix: another keeper accepts it, or the proposer writes the change directly with their own write key.
not_proposed
Section titled “not_proposed”Type invalid_request · Status 422
A review (POST /api/v2/{type}/{id}/review, a keeper accepting or declining a new element a seat made under the switch) named an element that carries no x_review_proposed mark: there is nothing to settle. A change to an existing element is decided through its proposals instead.
- How to fix: read the queue (
GET /api/v2/world/proposals) and review only itsnew_elementrows; an element whose mark was already cleared is settled.
proposed_only
Section titled “proposed_only”Type permission_error · Status 403
Under the world’s AI seats propose, a person accepts switch, an AI seat tried to delete an element it did not create, or to accept or decline a proposal; and on any world, the member a new element’s mark names tried to review it (since 2026-10-23). A seat under the switch proposes; a person decides.
- How to fix: leave the decision to a person’s key, or propose the change and let a keeper accept it.
review_by_another
Section titled “review_by_another”Type permission_error · Status 403
A key below co-builder (a contributor’s or a guest’s, a person’s or an AI seat’s) wrote a review mark, x_review_proposed or x_review_checked, with a by that is not its own. Below co-builder, a mark that carries a by is stored only when it is exactly the mark the element already holds (the same JSON: numbers by value, so 1 and 1.0 are one, and true is never 1), or when its by is the writer’s own membership id exactly as GET /api/v2/me gives it (lower case, with hyphens). Any other by is refused: a word, another member’s id, a Character’s id, owner, and the writer’s own id spelled any other way (capitals, no hyphens, braces, urn:uuid:). param names the mark’s key, and nothing is written. A mark with no by, a null that clears the mark, and every write from the owner’s keys or a co-builder’s pass. It applies on every element write and proposal, and on /bulk item by item (since 2026-11-11).
- How to fix: send your own membership id as
by(GET /api/v2/megives it), or send the mark exactly as the element holds it now; read the element again if it changed since.
too_many_open
Section titled “too_many_open”Type invalid_request · Status 422
The proposer already has five open proposals on this element, or fifty in this world. Lapsed rows do not count.
- How to fix: wait for a keeper to decide the open rows, or withdraw one of your own (
DELETE .../proposals/{pid}).
field_not_visible
Section titled “field_not_visible”Type invalid_request · Status 422
A proposal would set a field the caller cannot see: one a known-of stub withholds from this key. param names the field.
- How to fix: propose only the fields the element shows you.
resync_required
Section titled “resync_required”Type invalid_request · Status 409
A guest’s or a contributor’s /changes cursor is from before a change to what that key can see, or the cursor is not this caller’s shape (a guest’s and a contributor’s have three parts, the owner’s and a co-builder’s two). A contributor’s cursor stored before hidden elements arrived answers this once.
The envelope carries reason beside the five fields: role (your own role or membership moved) or view (something left your view: a delete, a hide, an unhide, a Character change). When both happened since your cursor, it says role. A page of the feed then carries epoch_reason beside epoch: why the epoch last moved, with the same two values.
- How to fix: pull the feed again from
since=0. Withreasonrole, keep what your copy holds that the new walk does not name; withview, drop it; with noreason(an older server), keep it: a reset never empties a copy. A tool never empties a copy on its own. See What a reset keeps, Guests’ cursors and The contributor’s cursor.
already_member
Section titled “already_member”Type invalid_request · Status 409
An invite names someone who is already a member of the world, or an invite is accepted by an account that is already a member. An invite link’s code that your own account already used answers this too, and spends nothing, so a join whose answer was lost is read by sending the code again (a code someone else spent stays 404).
The envelope carries world_id beside the five fields: the world you are a member of.
- How to fix: nothing to do; the membership exists. Open the world by
world_id, or check the roster withGET /api/v2/members.
pin_required
Section titled “pin_required”Type invalid_request · Status 409
A member without an account PIN tried to mint a write key. Accepting an invite or a link needs no PIN; member keys write with the member’s own account PIN.
- How to fix: set a PIN in your account settings, then retry.
player_role_fixed
Section titled “player_role_fixed”Type invalid_request · Status 422
The owner tried to change a player seat’s role: a player (no account) reads as a guest, and that role can’t be changed. Remove the player instead.
- How to fix: a player stays a guest. To give that friend more, remove the player and invite them as a person, by email or with an invite link; they will need an account.
seat_follows_sponsor
Section titled “seat_follows_sponsor”Type invalid_request · Status 422
The owner tried to set the Character of an AI seat its member made to play their own (param character): it plays what that member plays, and may change it only while they may. Hand the seat to yourself first (sponsor owner), then pick.
- How to fix: leave the Character to the member the seat follows, or hand the seat over first:
PATCHthe seat’s row withsponsorset toowner, then set itscharacter. A handed-over seat follows no one.
seat_above_sponsor
Section titled “seat_above_sponsor”Type invalid_request · Status 422
The owner tried to set an AI seat’s role above the role of the person who answers for it (param role), or any role above its own while that person is no member of the world: a seat is never above its sponsor. Hand the seat to yourself first (sponsor owner), then raise it.
- How to fix: send
sponsorownerwith therole, in one request or before it; the sponsor is set first. To keep the seat with its person, raise that person’s role instead. See No AI above its person.
character_hidden
Section titled “character_hidden”Type invalid_request · Status 422
The owner tried to set a hidden Character as the one an AI seat or a player plays (character on the member’s PATCH, or Change on its row under Members on the world page; param character). A played Character is on every reader’s roster, so a hidden one can never be picked, by anyone.
- How to fix: unhide the Character first, or pick another. See Playing a hidden Character.
character_played
Section titled “character_played”Type invalid_request · Status 422
A delete named a Character that someone plays: the world’s own Character (owner_character), or the Character of a live member, an AI seat or a player (param id). The message says who plays it (the world’s owner, the AI seat by its name, a player, a member), never an email or a username. Nothing was deleted. The rule holds on every door, the v1 API’s DELETE included, and a restore that would delete such a Character is refused with the same sentence.
- How to fix: point the player at another Character, or remove them, then delete: the owner’s own with
owner_characteronPATCH /world, a seat’s or a player’s by the owner withcharacteron the member’sPATCH, a person’s own withPUT /me/character.
character_taken
Section titled “character_taken”Type invalid_request · Status 422
A player opened a party link (a table of players) and picked a Character that a live seat in the world already plays (param character). Nothing was spent: the place is still there.
- How to fix: read the preview again and pick a Character it does not mark
taken. A pick that is not on the list, or was hidden or deleted since the link was made, is422invalid_requestwithparamcharacterinstead.
known_of_not_writable
Section titled “known_of_not_writable”Type invalid_request · Status 422
An element write carried known_of (param known_of), whatever its value. The key marks a stub, an element the reader knows of but does not see whole; a stub sent back would blank every field it leaves out. Nothing was written.
- How to fix: drop
known_ofand send only the fields you mean to change. Never echo a stub as a write; a tool that keeps stubs on disk never pushes them.
served_trimmed_not_writable
Section titled “served_trimmed_not_writable”Type invalid_request · Status 422
A write body carried x_served_trimmed (param x_served_trimmed). The server adds the key to a message it serves with recipients or a sender hidden from the reader (a message to someone hidden from you); it is never stored. Nothing was written.
- How to fix: drop
x_served_trimmedand send only the fields you mean to change. Sending the trimmedcharactersback is safe: the ids hidden from you are kept.
review_mark_empty
Section titled “review_mark_empty”Type invalid_request · Status 422
A write carried an empty x_review_proposed (param x_review_proposed): an empty string, a string of whitespace only, [] or {}. The review mark is read by its presence, so an empty one would mark nothing; it is never stored, and a stored one from before 2026-10-29 reads as absent. Nothing was written. It applies to every write route: POST, PUT, PATCH, each /bulk item and the v1 routes.
- How to fix: send the mark as an object (
by,evidence,expires) to mark the element proposed, ornullto clear it.
world_full
Section titled “world_full”Type invalid_request · Status 422
A player opened a player link, a table or a link for one, and the world already has its 50 players. Nothing was spent.
- How to fix: the world’s owner removes a player to free a place; the same link can then be tried again while it has not expired.
own_key_refused
Section titled “own_key_refused”Type invalid_request · Status 422
POST /api/v2/account/ask or POST /api/v2/account/sort: the account’s daily token rating is spent, so the call ran on the account’s own AI key, and its provider refused the key (revoked, wrong, or out of credit). Nothing was counted, and the call was not retried on the platform’s key. The account page shows when the key was last refused.
- How to fix: check or replace the key on the account page, then ask again. Retrying unchanged meets the same refusal; the token rating resets at midnight UTC.
answer_not_parsed
Section titled “answer_not_parsed”Type invalid_request · Status 422
POST /api/v2/account/ai/{use} for a use whose answer is checked JSON (today subs-captain, whose order must be valid on its wire): the model answered, but not in the shape the use promises (param answer), and asked once more it again gave no usable answer. The provider billed both answers, so they count against the use’s own daily budget, not the account’s token rating (or the account’s own AI key paid them). The model’s text is not returned. The error carries refusals beside the envelope’s fields: one row for each answer refused, in order, with its word (why it was refused), the provider’s stop_reason (max_tokens means it ran out of room, unlike an answer that finished in the wrong shape) and its output_tokens. Under an Idempotency-Key, a retry with the same key and body replays this refusal, refusals included, and bills nothing.
- How to fix: do not retry: carry out your tool’s own fallback for this decision, and call again for the next one.
removal_in_flight
Section titled “removal_in_flight”Type invalid_request · Status 409
POST /api/v2/media/remove-ticket: a removal ticket for this image was issued less than 10 minutes ago and hasn’t been used yet.
- How to fix: use the ticket you already have, or retry after the
Retry-Afterheader’s seconds.
upload_pending
Section titled “upload_pending”Type invalid_request · Status 409
POST /api/v2/media/remove-ticket: no image is recorded under this key yet, but an upload ticket in this world is still open and unreported. The upload may have just finished. The platform can’t tell which key an open ticket will get, so while the caller holds an open ticket (the owner key: any ticket in the world; anyone else: their own), any key answers this until that ticket expires, 10 minutes after it was issued. After that a key with no image answers not_found.
- How to fix: retry after the
Retry-Afterheader’s seconds (2).
invalid_credentials
Section titled “invalid_credentials”Type authentication_error · Status 401
The API key or PIN is missing, unknown or wrong.
- Common cause: no
API-Keyheader, a mistyped key, or a missing or wrongAPI-Pinon a write. Only a legacy 10-digit key also needs the PIN to read a private world; prefixed keys (ow_w_,ow_r_) read without it. A deleted world’s keys are deleted with it, so they also answerinvalid_credentials. - How to fix: check the
API-KeyandAPI-Pinheaders (exact names) and that the key belongs to the world you mean.paramtells the two apart:API-Pinon every PIN refusal,nullfor the key. The one other PIN refusal is apinsent in the body ofPOST /api/v2/account/worldsor the hand-over by an account that has one (since 2026-11-07):parampin, messageIncorrect PIN., nothing made. The message then says which:A PIN is required: send it as API-Pin.when none was sent,Incorrect PIN.when it was wrong,No valid API-Key.for the key. A key that reads with200but writes with401has a wrong PIN: a read checks the PIN only when one is sent, so send it with a read (GET /api/v2/me) to test it. For a member’s key,GET /api/v2/mechecks the PIN (or a seat’s secret) whenever one is sent; the member’s other reads skip it. Keys are minted in the account portal. The PIN is a 4-digit number (1000 to 9999) set on your account in account settings, and it guards writes to every world you own; a member writes with their own account PIN, and an AI seat sends its seat secret (ow_s_…) asAPI-Pin. See Keys and PINs.
key_revoked
Section titled “key_revoked”Type authentication_error · Status 401
The API key was recognized but has been revoked.
- Common cause: a key that was revoked in the account portal is still used by an old client or script, or an AI seat’s old key, after its sponsor or the owner made it a new one.
- How to fix: mint a new key in the account portal and update the client; an AI seat asks its sponsor or the owner for a new key (Making a seat). Revocation is permanent for that key.
wrong_audience
Section titled “wrong_audience”Type authentication_error · Status 401
The account token is good on some routes only: one issued to a hosted MCP client works at the MCP server at /mcp only, and an AI door token works on GET /api/v2/account/ai, the uses it names and its own revoke only.
- Common cause: a token a hosted client was given through its OAuth sign-in, sent as a bearer to a REST route, the account routes included; or an AI door token sent to any other route.
- How to fix: use each token only where it works. For the REST API, send a world key (
API-Key), or an account token from Sign in with OnlyWorlds for the account routes.
use_not_granted
Section titled “use_not_granted”Type permission_error · Status 403
An AI door token called a use it was not minted for. param is use. Nothing was counted.
- Common cause: a token minted with
ai_uses: ["ask"]callingPOST /api/v2/account/ai/sort. - How to fix: mint an AI door token that names this use, or call with an account credential.
permission_error
Section titled “permission_error”Type permission_error · Status 403
The credential is valid but lacks the scope for this route.
- Common cause: a read key (
ow_r_…) on a write route: create, update, delete, link operations, bulk, or an image ticket. Also a file added to the practice world, which takes no files (“The practice world takes no files.”). - How to fix: use a write key (
ow_w_…, or a legacy key) for writes. A403means the key is genuine and cannot do this; a401invalid_credentialsmeans the key itself is not accepted.
not_author
Section titled “not_author”Type permission_error · Status 403
A contributor or guest key changed, replaced, relinked or deleted an element someone else created. In /bulk it is reported per item. A co-builder’s key gets it too when it adopts a Character an AI seat plays: who made that one is the owner’s to change.
- How to fix: these roles change only their own elements (
created_bynames the creator). Ask the owner for the co-builder role, or leave the element alone. One exception: a seat the owner gave a Character to play with the right to change it may change it, never delete it (After joining). See Roles.
not_reader
Section titled “not_reader”Type permission_error · Status 403
A key wrote a Read mark that is not its own, or a write would turn someone else’s Relation into one. A Read mark is the Relation with supertype Read that records what one reader has read (messages); only its maker writes it, the owner and co-builders included.
- How to fix: mark messages read with your own key, or through
POST /api/v2/account/worlds/{world_id}/read, which finds or makes the caller’s own mark. Leave other readers’ marks alone.
narratives_only
Section titled “narratives_only”Type permission_error · Status 403
In a world where AI seats propose and a person accepts (agent_writes_proposed on the world body), an AI seat sent its own Read mark more than its list of read messages, and nothing was written. Its mark takes only narratives: a PATCH or a link edit of narratives alone, a PUT of the existing mark that changes nothing else, or a new mark in its one form, named Read: and the seat’s Character’s name, with that Character as actor.
- How to fix: send only
narratives, or mark messages read throughPOST /api/v2/account/worlds/{world_id}/read, which finds or makes the caller’s own mark.
hidden_not_allowed
Section titled “hidden_not_allowed”Type permission_error · Status 403
A create (POST, a PUT of a new id, a /bulk item that creates) carried hidden: true from a key that may not hide. Nothing was created. In /bulk it is reported per item.
- How to fix: leave
hiddenout, or ask a keeper: only the world’s owner and its co-builders, a person or a seat, may create an element hidden. See Creating an element hidden.
owner_only
Section titled “owner_only”Type permission_error · Status 403
A key that may not change the world’s own fields sent PATCH /api/v2/world: a contributor’s or a guest’s, or a co-builder’s that sent owner_character. A co-builder may change every other writable field.
- How to fix: use the owner’s key or a co-builder’s; leave
owner_characterto the owner.
keeper_only
Section titled “keeper_only”Type permission_error · Status 403
A key below co-builder (a contributor’s, a guest’s, or a seat’s) set, changed or removed x_charter_of on an element of any type, the mark that makes a Charter, a Guide or a Domain one of the world’s reading aids. Since 2026-11-21 the same key also gets it for a change to the world’s house rules, whoever made them: changing, relinking or deleting a Law that carries x_charter_of (the Charter, a superseded one or a hidden one) or an Object the text of such a Law names, adding a file to one or removing one from it, and creating an Object under an id such a Law names. Nothing is written.
- How to fix: leave
x_charter_ofout of the write; for a change or a link edit to the house rules, propose the change (POST /api/v2/{type}/{id}/proposals) for the owner or a co-builder to accept; a delete or a file has no proposal form, so ask one of them; and create a new Object without an id or with another one. Or use the owner’s key or a co-builder’s (The front door).
not_co_builder
Section titled “not_co_builder”Type permission_error · Status 403
A key that is not a co-builder’s called the world’s invite links (/api/v2/links): a contributor’s, a guest’s, a player’s, or one of the owner’s own world keys.
- How to fix: a co-builder’s key (a person’s with its PIN, or an AI seat’s with its secret) makes guest and contributor links here. The owner makes links through the account routes,
/api/v2/account/worlds/{world_id}/links(Invite links).
view_as_owner_only
Section titled “view_as_owner_only”Type permission_error · Status 403
A member key sent as on a read that takes it (an element get or list, search, the metadata routes). Reading as another reader is the owner’s: only a key with no member, the owner’s own keys or a legacy key, may send it.
- How to fix: send
aswith one of the owner’s keys, or leave it out. A member key reads as itself. See View as.
csrf_required
Section titled “csrf_required”Type permission_error · Status 403
A write (POST, PUT, PATCH, DELETE) to an /api/v2/account/ route came signed in only by onlyworlds.com’s own session cookie, without its CSRF token. Nothing was written.
- Common cause: a page served from onlyworlds.com, signed in through the site, that posts to the account routes without the token.
- How to fix: send the
csrftokencookie’s value in theX-CSRFTokenheader (or as thecsrfmiddlewaretokenform field). Anow_a_account token or anX-Session-Tokenneeds no CSRF token: a tool on its own site signs in with one of those (Account tokens).
guest_not_supported
Section titled “guest_not_supported”Type permission_error · Status 403
A guest key called a route guests cannot use (world sharing, token status), or wrote a note (a Narrative) with no Character of its own in the world, or, where AI seats narrate as themselves, an AI seat with no Character wrote a Narrative.
- How to fix: use a key with a role other than guest, or skip the route. For a note, nothing in the request can fix it: ask the world’s owner. See Guests.
storage_full
Section titled “storage_full”Type permission_error · Status 403
POST /api/v2/media/ticket: the account the upload counts against has used all of its image storage. The message names the cap.
- How to fix: no ticket is issued. Use an image hosted elsewhere (
image_urltakes any URL), or contact info@onlyworlds.com about the cap.
files_full
Section titled “files_full”Type permission_error · Status 403
Asking for a ticket to attach a file to an element (POST /api/v2/{type}/{id}/files): the world’s files have no room for this one. A world holds 250 MB of files, whoever uploads them. The message gives the world’s use, its cap and the file’s size: “This world has 249.6 MB of its 250 MB. This file is 4 MB. Remove a file, or ask the owner.”
- How to fix: no ticket is issued. Remove a file from the world, or ask the world’s owner to.
GET /api/v2/world/fileslists the world’s files and its total. See Files.
not_found
Section titled “not_found”Type not_found · Status 404
The requested element or route does not exist.
- Common cause: a read,
PATCHor link operation on an element UUID that is not in this world, or a mistyped path: an address under/api/that no route matches answers this envelope too, never a web page. For a guest key, an element the guest cannot see; for any key, an element hidden from it, also on aPUTor aPOSTnaming its id (neverid_conflict). An agent join code that is unknown, used, revoked or expired also answersnot_found, the same answer for every case. - How to fix: check that the UUID exists in this world and that the path is right.
DELETEis idempotent: deleting an element that is already gone returns204, not404.
Type not_found · Status 410
A read of one element (GET /api/v2/{type}/{id}) named an element this world held and deleted. Beside the error, the reply carries the deletion’s change_seq and deleted_at:
{ "error": { "type": "not_found", "code": "gone", "message": "marker '…' was deleted from this world.", "param": null, "doc_url": "https://onlyworlds.github.io/api/errors/#gone" },
"change_seq": 3, "deleted_at": "2026-10-08T16:43:38.278435+00:00" }- Common cause: a local copy, a link or a bookmark that still holds the id after someone deleted the element.
- How to fix: drop the element from your copy. To learn of deletes as they happen, follow the change feed, which carries each as a tombstone. An id this world never held, one deleted in another world, a guest’s read, an element hidden from the key and the Classic API still answer
404not_found.
rate_limited
Section titled “rate_limited”Type rate_limited · Status 429
Too many failed authentication attempts, such as repeated wrong PINs, or too many sign-in attempts from one address: the password sign-in and the code exchange of Sign in with OnlyWorlds share one count, 40 in 5 minutes.
- Common cause: a script or a person trying one PIN after another.
- How to fix: fix the credential, then wait the number of seconds in the
Retry-Afterheader. Since 2026-11-21 a wrong PIN is a401invalid_credentialsevery time, with no short waits, until ten different wrong PINs have been tried on one key or one account inside fifteen minutes. Then every request that carries a PIN there is this429, the right PIN included, until the oldest of the ten is fifteen minutes old:Retry-Afteris that wait, up to 900 seconds, except in the fifteen seconds after the newest PIN arrived, when it says 15 (a check still running may free the place). The429names where the PIN was sent, as its401does:paramAPI-Pin, orpinon the account routes. - Wrong PINs count on the key and on the account whose PIN it is (the owner’s for a world’s keys, the member’s for a member’s key), so a new key does not start a fresh count; an AI seat’s secret counts on its key alone. The same wrong PIN sent again counts once and never locks, a missing or empty PIN stays its
401and takes no place, the right PIN does not wipe the count, and a write to a world with no PIN passes even while its key or account is at ten.
quota_exceeded
Section titled “quota_exceeded”Type rate_limited · Status 429
A daily limit is used up. These routes answer it:
-
POST /api/v2/media/ticket: the world has asked for 200 image upload tickets in the last 24 hours (Images). -
POST /api/v2/{type}/{id}/files: the world has asked for 200 file tickets in the last 24 hours (Files). -
POST /api/v2/account/askandPOST /api/v2/account/sort, and the AI door’sPOST /api/v2/account/ai/{use}: the account has used its daily token rating (fewer tokens left than the call’s output cap). Tokens used reset at midnight UTC. -
How to fix: retry after the
Retry-Afterheader’s seconds.
use_ceiling
Section titled “use_ceiling”Type rate_limited · Status 429
POST /api/v2/account/ai/{use}: this account has made today’s calls to this use (param is use). Its daily ceiling is reached until midnight UTC, and nothing was counted. A saved AI key does not lift it: the limit is the use’s, not the token rating’s. GET /api/v2/account/ai shows each use’s ceiling and calls_left.
- How to fix: retry after the
Retry-Afterheader’s seconds (midnight UTC).
use_in_flight
Section titled “use_in_flight”Type rate_limited · Status 429
POST /api/v2/account/ai/{use}: another call to this use is still running for this account (param is use). A use allows one call at a time; nothing was counted.
- How to fix: retry after the
Retry-Afterheader’s seconds (a few). With anIdempotency-Key, send the same key and body.
too_many_requests
Section titled “too_many_requests”Type rate_limited · Status 429
Over the request budget: 300 requests a minute for one key or account token, 60 a minute from one address for a request with neither. Reads and writes count together, and a /bulk call is one request. The minute is the clock’s minute, so the count starts again at its end. The message names the budget and the wait: Too many requests: 300 a minute for this key. Wait 12 seconds.
- Common cause: a loop that never sleeps, or many copies of one program (every player of a game, every tab of a page) sending the same key, which share its 300.
- How to fix: wait the
Retry-Afterseconds, which equalRateLimit-Reset. To stay under, read theRateLimit-Remainingheader every reply carries, batch writes into/bulk, and follow/changesinstead of reading every element type again. A key locked by wrong PINs answersrate_limitedinstead, even over the budget. See Limits.
idempotency_error
Section titled “idempotency_error”Type idempotency_error · Status 409
An Idempotency-Key header was reused with a different request body.
- Common cause: reusing one idempotency key across two different requests.
- How to fix: one key names exactly one request: use a new key (a new UUID) for each distinct write. Replaying the identical body with the same key is fine: it returns the original stored response, with an
Idempotent-Replay: trueheader, and does not write twice. See Idempotency.
idempotency_in_flight
Section titled “idempotency_in_flight”Type idempotency_error · Status 409 · Retry-After 1
A request with the same Idempotency-Key is still running. Nothing was written by this one.
- Common cause: a retry sent while the first request was still being processed, typically after a client-side timeout.
- How to fix: wait
Retry-Afterseconds and send again with the same key and body: once the first request has answered, the retry replays its answer (Idempotent-Replay: true). Don’t change the key; that would write twice. The Python package retries this for you (0.4.0); the TypeScript SDK names itisIdempotencyInFlight(4.27.0).
api_error
Section titled “api_error”Type api_error · Status 500
An unexpected server-side error. The envelope holds even here: the API never answers with a bare HTML error page.
- Common cause: a bug or a passing infrastructure fault on the server, not your request’s shape.
- How to fix: retry after a short delay. If it persists, report it to info@onlyworlds.com with the time and the request. Server errors are logged on our side.
server_busy
Section titled “server_busy”Type api_error · Status 503
Every request slot on the server stayed full for 10 seconds.
- How to fix: retry after the
Retry-Afterheader’s seconds.
ask_failed
Section titled “ask_failed”Type api_error · Status 502
POST /api/v2/account/ask: the model behind Ask your world gave no answer. The question was not counted against the day’s token rating.
- How to fix: try again in a moment.
ask_unavailable
Section titled “ask_unavailable”Type api_error · Status 503
POST /api/v2/account/ask: asking is switched off on this server, or paused for the rest of the day because the server-wide spending cap was reached. The question was not counted. With param set to use (on the AI door’s routes and on ask and sort), this one use is switched off or has spent its own budget for today.
- How to fix: try again tomorrow (UTC). Your world’s own search still works without it.
payload_too_large
Section titled “payload_too_large”Type api_error · Status 413
The request body is over 2.5 MB. The server refuses it without writing anything.
- How to fix: send less per request: split a large
/bulkbatch into several, and upload images through image upload, never inside a JSON body.
file_too_large
Section titled “file_too_large”Type invalid_request · Status 413 · Param size
Asking for a ticket to attach a file to an element (POST /api/v2/{type}/{id}/files): the file is over 25 MB. The message gives both sizes: “This file is 41 MB; a file can be at most 25 MB.”
- How to fix: no ticket is issued. Send a smaller file, or split the document into parts. See Files.
media_unavailable
Section titled “media_unavailable”Type api_error · Status 503
Image or file upload is not configured on the server right now: POST /api/v2/media/ticket for an image, and for a file the ticket, download and remove routes. There is no Retry-After.
- How to fix: retry later, or use an image hosted elsewhere. If it persists, report it to info@onlyworlds.com.
Bulk errors
Section titled “Bulk errors”POST /api/v2/bulk answers HTTP 200 once the batch is read. (A malformed request, such as bad JSON, items not an array or over 1000 items, or an authentication failure answers with its own status and the envelope.) Success and failure are reported per item, in request order, under a top-level errors flag:
{
"errors": true,
"items": [
{ "status": 201, "id": "0695…", "created_at": "…", "updated_at": "…" },
{ "status": 400, "id": "0698…",
"error": {
"type": "invalid_request",
"code": "invalid_link",
"message": "location references Location '…' which does not exist in this world or among the batch's surviving items.",
"param": "location",
"doc_url": "https://onlyworlds.github.io/api/errors/#invalid_link"
} }
]
}errorsistrueif any item failed,falseif all succeeded.- Each item’s
erroruses the same envelope as above. The codes seen per item areinvalid_request(unknown field, wrong shape),invalid_link(a reference to a missing element),not_author(403, a contributor or guest touching someone else’s element),hidden_not_allowed(403, an item that creates withhidden: truefrom a key that may not hide) andapply_failed. - Each item’s
statusis what a single write would have returned:201created,200replaced, or400,403or422for the errors above. - Partial success is the default: one bad item does not stop the batch. Send
"atomic": truefor all or nothing. See Bulk.
apply_failed
Section titled “apply_failed”Type invalid_request · Status 422, per bulk item
The item passed validation but the write itself failed a database constraint. The most common cause is an id that already exists: element ids are unique across all worlds, so a copied element can collide with its original in another world. The message names the failing element’s id.
- How to fix: give the element a new UUID, or remove the other copy.
Upload host errors
Section titled “Upload host errors”The upload host, upload.onlyworlds.com, takes images and files. It is not part of the API and answers errors in its own shape, {"error": "<code>"}. Its open paths are POST https://upload.onlyworlds.com/v1/upload and POST /v1/remove for images, and POST /v1/file for a file (the upload_url of a file ticket); the host’s root and every other path redirect to a login on purpose, and are not for browsers. A successful image upload answers 201 with {url, key, bytes, type, etag}, a file upload with {key, fid, bytes, type, etag}.
| Status | Code | What to do |
|---|---|---|
401 |
ticket_required |
Send the ticket as Authorization: Bearer <ticket>. |
401 |
ticket_invalid |
Send the ticket exactly as the API returned it. |
401 |
ticket_expired |
Tickets last 10 minutes: get a new one. |
401 |
ticket_used |
One ticket, one upload: get a new one for the next image or file. |
400 |
bad_key |
The X-Key is not allowed: it must start with the ticket’s prefix, use only a-z 0-9 . _ - and single slashes, stay within 200 characters, and carry an extension that matches the file’s bytes. The response’s reason field names the cause. |
400 |
empty_body |
The request had no bytes. |
411 |
content_length_required |
Send a Content-Length header. |
405 |
method_not_allowed |
Only POST uploads. |
409 |
exists |
An image: that X-Key is taken and objects are never overwritten; choose another, or omit X-Key. A file: its ticket was already used and the file is stored, so a retry after a success reads this as done. |
413 |
too_large |
The image or file is over the ticket’s max_bytes. |
415 |
unsupported_type |
An image: send webp, png, jpeg or avif (the type is read from the bytes; no SVG). A file: its bytes are not its kind, or a zip is not a world’s bundle (What a file can be); nothing was stored and the ticket is still unspent, and the reason field names the cause. |
502 |
write_failed |
Nothing was stored and the ticket is still unspent: retry with the same ticket. |
403 |
not_removable |
The image was not uploaded into the removal ticket’s world with a ticket, so it can’t be removed this way. |
502 |
remove_failed |
Nothing was removed and the removal ticket is still unspent: retry with the same ticket. |
503 |
ticket_lane_unconfigured |
Uploads or removals, of images and files alike, are not configured on the host right now: nothing was stored and the ticket is unspent; retry later. |
AI agents: start from llms.txt, this site's index, which links the whole documentation as plain text.