Create World
Changed onBody {name, pin?, key_name?, source?, producer?}. An account without a PIN must send pin (1000-9999), which becomes its account PIN; an account with one may send it to have it checked before the world is made (401 on a mismatch, nothing written; the lock of a write's PIN wall), or omit it. Returns the world and an ow_w_ key, shown once; key_name names that key. source and producer are the folder's provenance lines, kept on the World as given and served by GET /world as origin.
Request
- Base URLhttps://www.onlyworlds.com
- Auth
- HTTP bearer
- or API key in header X-Session-Token
Headers
Replays of the same key with the same body return the first successful response (with Idempotent-Replay: true) for 24h; the same key with a different body is a 409 idempotency_error. While the first request with a key is still running, the same key is a 409 idempotency_in_flight: retry after Retry-After.
Request body
The world's name (not blank).
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.
A name for the world's write key, as the website's key list shows it (1 to 80 characters, not blank; trimmed). Omitted or null: the key has no name. The route makes exactly one key either way.
{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.
{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.
Response
Created: the world and its write key (shown once). A replay under the same Idempotency-Key answers the same world without key: mint one on the account token.
The new world's id.
The world's name, as sent, trimmed.
Always owner: the account that made the world owns it.
Whether anyone may read the world without a key. A new world starts private (false).
The world's keys, never in full: here the one write key the route made.
The full ow_w_ write key, shown this once: keep it, it is never shown again. Its last four characters are the key row's last4.
Changes
- warning
deleted the
headerrequest parameterX-OW-Agent - warning
deleted the
headerrequest parameterX-OW-Client
- warning
- info
added the optional property
error/limitto the response with the status
5 more changes in this revision
- info