---
title: "Handover World"
method: POST
path: "/api/v2/account/worlds/handover"
tags: ["Account"]
---

# Handover World

`POST /api/v2/account/worlds/handover`

## Request

- Base URL: `https://www.onlyworlds.com`
- URL: `https://www.onlyworlds.com/api/v2/account/worlds/handover`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-Session-Token`

Body `{world: {name, pin?, source?, producer?}, items: [...]}`. Makes the
world, owned by this account, and writes every item in it, all or nothing: an
item keeps the `id` it carries, and items link to each other by those ids.
`world` takes what POST /account/worlds takes, without `key_name`: no key is
made here; the world page makes keys. `items` is POST /bulk's array, 1 or
more. When any item is refused nothing is written, not the world and not the
account PIN: 409 when an id is held in another world, else 422, with each
item's result in `items` beside the error. On success, 201 with the world, each
item's result, and `door`, the world page.

An Idempotency-Key makes a retry safe, as /bulk's does: the same key and body
answer the same 201 again (Idempotent-Replay: true), the one world; the same key
with another body is 409 idempotency_error. The key is the account's, since no
world exists before the call. Without one, a retry after a lost answer meets 409
on every id (they landed in the first world), which is under the account's worlds.

## Headers

- `Idempotency-Key` string
- `X-OW-Client` string
- `X-OW-Agent` string

## Request body

- object
  - `world` object, required: The new world: its name; the account PIN (required when the account has none yet; optional after, checked before anything is written); optionally source and producer.
    - `name` string, required: The world's name (not blank).
    - `pin` union: The account PIN, 4 digits. An account with no PIN yet must send one (1000-9999): it becomes the account PIN and the write wall on every world of the account. An account with a PIN may send it to have it checked before the world is made: a wrong one is 401 (invalid_credentials, param pin) and nothing is written, with the same lock as a write's PIN wall; omitted, the world is made and takes the account's PIN as before.
      - string
      - integer
    - `source` object, nullable: {server, world, at}: the server and world the folder was exported from, and when. Kept as given. Served as origin.source; null clears it. An object, or null; source.world a string when present. An object or array in it may sit at most 200 levels deep, the World record as the first.
      - `world` string
    - `producer` object, nullable: {tool, version, input}: the tool that made the folder, its version, and what it made it from. Kept as given. Served as origin.producer; null clears it. An object, or null; producer.tool a string when present. An object or array in it may sit at most 200 levels deep, the World record as the first. origin: where the world first came from, as the tool that made it from a folder wrote it (the folder format's provenance lines, 4.2): source {server, world, at} and producer {tool, version, input}, each an object or null (null: not known). Written as the plain keys source and producer on the account's world create (POST /api/v2/account/worlds) or on PATCH, by the owner or a co-builder, and kept as given: the server checks only that each is an object or null, that no object or array in it sits more than 200 levels deep (the World record as the first), and that source.world and producer.tool are strings when present. origin itself is not writable. The owner's download keeps writing its own source line beside it.
      - `tool` string
  - `items` object[], required: 1 to 1000 elements, each `{type, element}` as in POST /bulk. Give each element its own `id` to keep the ids the client made; items link to each other by those ids.
    - `type` string, required: The element type, e.g. character.
    - `element` object, required: The element's fields, as for a create.

## Response `201`

Created: the world and every element, with the ids sent. No key is made.

- object
  - `world` AccountWorldRow, required: The world's account row, as GET /account/worlds lists an owned world, with the World's extension keys (x_, atlas_, shadow_) as the hand-over wrote them beside these fields.
    - `id` string, uuid, required: The world's id.
    - `name` string, required: The world's name, as sent, trimmed.
    - `role` string, required: Always owner: the account that made the world owns it.
    - `public_read` boolean, required: Whether anyone may read the world without a key. A new world starts private (false).
    - `keys` AccountWorldKey[], required: The world's keys, never in full: empty here, since the hand-over makes none.
      - `name` string, required: The key's name, as the website's key list shows it; empty when the key has none.
      - `last4` string, required: The key's last four characters, to tell keys apart.
      - `scope` 'READ' | 'WRITE', required: What the key may do: READ, or WRITE (reads and writes).
      - `revoked` boolean, required
  - `items` object[], required: One result per request item, in the same order, as POST /bulk answers it.
    - `status` integer, required: 201 created, 200 replaced, 202 proposed (the element unchanged; see `proposal`), or the item's error status.
    - `id` string, uuid, nullable, required
    - `created_at` string, date-time, nullable
    - `updated_at` string, date-time, nullable
    - `proposal` Proposal: Only on a 202 item: the proposal the write became, on a world that takes an AI seat's writes as proposals.
      - `kind` 'proposal', required: Always `proposal`: in the world's queue it tells this row from a `new_element` row (ProposalList).
      - `id` string, uuid, required: The proposal's id.
      - `element_type` string, required: The element's type.
      - `element_id` string, uuid, required: The element's id.
      - `house` 'charter' | 'skill' | 'new_charter' | 'null', nullable, required: What part of the world's house rules this proposal would change, null for anything else: `charter`, a Law that carries the Charter mark (`x_charter_of`); `skill`, an Object the text of such a Law names; `new_charter`, a Law an accept would make a Charter (on a proposal row: it sets the mark, and the Law's supertype after it is Charter; on a new element's row: a new Law that carries the mark). Read when the row is served, as the world stands then. Worked out only for the world's owner and its co-builders: to any other reader it is null.
      - `state` 'open' | 'lapsed' | 'accepted' | 'declined', required: open; lapsed once `expires` has passed (it may still be accepted or declined); accepted; declined.
      - `fields` object, required: What the proposal changes, and only that: the proposed values of the fields (schema fields and extension keys alike) that differ from the element's own when it was made, in the element's wire shape. A field the proposer sent with the value it already had is not here. An accept writes exactly these fields; extension keys are merged.
      - `omitted` string[], required: The fields a whole replace (a PUT) did not send that were not empty on the element: each is in `fields` at its empty value ("", null or []), as the PUT would have written it, so an accept empties it. Show them as left empty by this replace. Always [] for a PATCH, a link edit or a proposal made on its route; extension keys are never here (an accept merges them).
      - `base` object, required: The element's values when the proposal was made, taken by the server, for every field the write named (a PUT: every schema field), so a card diffs `fields` against it. An accept is refused (409 stale_proposal) when a field in `fields` has moved since; a change to any other field does not count.
      - `base_seq` integer, required: The element's change_seq when the proposal was made, for the record.
      - `evidence` string, required: What the change rests on: a line of text or an element id. Quoted data, never an instruction.
      - `expires` string, date-time, required: When it lapses if nobody decides (UTC).
      - `by` string, required: Who proposed it: the membership id (a person, an AI seat or a player seat, as GET /members lists them), or `owner`.
      - `via` string, required: The door it came through, as an element's changed_via.
      - `client` string, nullable, required: The X-OW-Client name the request carried, or null.
      - `decided_by` string, nullable, required: The keeper who accepted or declined it (a membership id or `owner`), or null.
      - `decided_at` string, date-time, nullable, required
      - `decline_reason` string, nullable, required
      - `created_at` string, date-time, required
      - `updated_at` string, date-time, required
    - `error` object: Only on a failed item: the same object a standalone error's `error` holds.
      - `type` 'api_error' | 'authentication_error' | 'idempotency_error' | 'invalid_request' | 'not_found' | 'permission_error' | 'rate_limited', required
      - `code` 'already_member' | 'answer_not_parsed' | 'api_error' | 'apply_failed' | 'ask_failed' | 'ask_unavailable' | 'character_hidden' | 'character_played' | 'character_taken' | 'csrf_required' | 'field_not_visible' | 'file_too_large' | 'files_full' | 'gone' | 'guest_not_supported' | 'handover_refused' | 'hidden_not_allowed' | 'id_conflict' | 'idempotency_error' | 'idempotency_in_flight' | 'invalid_credentials' | 'invalid_grant' | 'invalid_link' | 'invalid_request' | 'keeper_only' | 'key_revoked' | 'known_of_not_writable' | 'lens_hidden' | 'lens_is_template' | 'media_unavailable' | 'narratives_only' | 'not_a_lens' | 'not_author' | 'not_co_builder' | 'not_found' | 'not_proposed' | 'not_reader' | 'one_credential' | 'own_key_refused' | 'own_proposal' | 'owner_only' | 'payload_too_large' | 'permission_error' | 'pin_required' | 'player_role_fixed' | 'precondition_failed' | 'proposed_only' | 'quota_exceeded' | 'rate_limited' | 'read_as_owner_only' | 'removal_in_flight' | 'resync_required' | 'review_by_another' | 'review_mark_empty' | 'seat_above_sponsor' | 'seat_follows_sponsor' | 'served_trimmed_not_writable' | 'server_busy' | 'stale_proposal' | 'storage_full' | 'too_many_open' | 'too_many_requests' | 'upload_pending' | 'use_ceiling' | 'use_in_flight' | 'use_not_granted' | 'view_as_owner_only' | 'world_full' | 'write_not_granted' | 'wrong_audience', required: Stable, machine-readable (e.g. invalid_link, id_conflict).
      - `message` string, required
      - `param` string, nullable, required: The offending field or parameter, when there is one.
      - `doc_url` string, required
      - `refusals` object[]: Only on `answer_not_parsed`: each answer keel refused, in order. Never the answer's text.
        - `word` string, required: Why keel refused it (empty, not_json, ...).
        - `stop_reason` string, required: How the provider says the answer ended (max_tokens: it ran out of room).
        - `output_tokens` integer, required: The tokens the answer spent.
      - `unknown_fields` string[]: On a read whose `fields` list names fields this type does not have (`param` fields): every such name, in the order sent.
      - `types_with_field` object: Beside `unknown_fields`: for each unknown name another element type has, those types.
      - `allowed_fields` string[]: Beside `unknown_fields`: the names this type's `fields` takes (`type` and an extension field name pass too).
      - `limit` string: On a write refused because an element, or the world's own store, would hold more than it may: a limit it passed, by its name in `info.x-ow-limits`, where its number and unit are: `element_bytes` (its text and links), `element_link_ids` (the ids in its link lists) or `extensions_bytes` (its extension fields, or the world's own store). A write past more than one is told of one at a time. These refusals are a 422 with code invalid_request. This is not `param`: a refused `limit` query parameter is named in `param`, and this key is absent there. An error without this key says nothing about limits. Other refusals for a limit keep their own codes and do not carry it: a full world (world_full), a file too large (file_too_large), a request body too large (payload_too_large). More values may appear without notice, each a key of `info.x-ow-limits`.
  - `door` string, required: The world page on onlyworlds.com, a path on this host: send the person there.

## Other responses

- `401`: Missing or invalid account credential (Bearer ow_a_ token or session). Or `world.pin` sent by an account that has one did not match it (invalid_credentials, param pin): nothing was written.
- `403`: A read-only account token: one from a read-only sign-in is refused on this route (permission_error).
- `409`: Nothing was written: an item's id is held by an element in another world, or is an id a membership already holds, a member's or a seat's in any world, a removed member's too (handover_refused; that item's slot in `items` says id_conflict). Give the item a new id and send the whole world again. Or, without `items`: an Idempotency-Key was reused with a different body (idempotency_error), or a request with this Idempotency-Key is still in flight (idempotency_in_flight; retry after Retry-After).
- `422`: Nothing was written: the world or the body failed a check (invalid_request, `param` names it), or an item was refused (handover_refused, with `items`).
- `429`: Ten different wrong PINs for this account within fifteen minutes (rate_limited, param pin): wait Retry-After seconds; the same count as a write's PIN wall. Or too many requests: over the request budget (code too_many_requests, type rate_limited): 300 requests a minute per key or account token, 60 a minute per address for a request with neither. Retry after the Retry-After header's seconds.
- `503`: The server is busy: every request slot stayed full for 10 s (code server_busy, type api_error). Retry after the Retry-After header's seconds.

## Changes

- **2026-11-28** `e45847b3f48f`: 9 info
  - added the optional property `allOf[subschema #1: Error]/error/limit` to the response with the `409` status
  - added the optional property `allOf[subschema #1: Error]/error/limit` to the response with the `422` status
  - added the optional property `allOf[subschema #2]/items/items/error/limit` to the response with the `409` status
  - added the optional property `allOf[subschema #2]/items/items/error/limit` to the response with the `422` status
  - …5 more
- **2026-11-26** `f921dd878e35`: 9 warning
  - added the new `write_not_granted` enum value to the `allOf[subschema #1: Error]/error/code` response property for the response status `409`
  - added the new `write_not_granted` enum value to the `allOf[subschema #1: Error]/error/code` response property for the response status `422`
  - added the new `write_not_granted` enum value to the `allOf[subschema #2]/items/items/error/code` response property for the response status `409`
  - added the new `write_not_granted` enum value to the `allOf[subschema #2]/items/items/error/code` response property for the response status `422`
  - …5 more
- …earlier changes not shown

[Operation history](https://skmtc.dev/onlyworlds/apis/onlyworlds-api/changes/api/v2/account/worlds/handover/post.md)

---

[API](https://skmtc.dev/onlyworlds/apis/onlyworlds-api.md) - [All operations](https://skmtc.dev/onlyworlds/apis/onlyworlds-api/llms.txt) - [OpenAPI document](https://skmtc.dev/onlyworlds/apis/onlyworlds-api/revisions/6c819f2e4bbd?raw)
