Skip to main content
POST
/
v1
/
worlds
/
{id}
/
checkout
Check out a version
curl --request POST \
  --url https://api.alakazam.gg/v1/worlds/{id}/checkout \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "versionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "expectedRev": "<string>"
}
'
{
  "world": {
    "id": "<string>",
    "name": "<string>",
    "entrance": {
      "image": {
        "src": "<string>",
        "label": "<string>"
      },
      "state": "<string>"
    },
    "scene": {
      "states": {},
      "events": [
        {}
      ]
    },
    "description": "<string>",
    "cover": "<string>"
  },
  "rev": "<string>"
}

Authorizations

Authorization
string
header
required

An app API key, e.g. Authorization: Bearer sk_live_…. Secret (sk_) for writes/sessions; publishable (pk_) for read/embed.

Headers

If-Match
string

The rev you read; checkout returns 409 if it is stale (optimistic concurrency).

Path Parameters

id
string<uuid>
required

Body

application/json
versionId
string<uuid>
required
expectedRev
string

Alternative to the If-Match header for optimistic concurrency.

Response

World checked out

world
object

A playable world. The full contract is published as JSON Schema at https://alakazam.gg/schema/smworld-1.0.json (see schema/COMPATIBILITY.md). Additional optional properties are allowed (forward-compatible).

rev
string