Skip to main content
POST
/
api
/
v1
/
spaces
/
{space_id}
/
session
/
patch
Apply Patch
curl --request POST \
  --url https://api.example.com/api/v1/spaces/{space_id}/session/patch \
  --header 'Content-Type: application/json' \
  --data '
{
  "target_version": 123,
  "operations": [
    {}
  ]
}
'

Apply Space Patch

Apply an operational patch to the space’s state. Patches are versioned for conflict resolution.

Authentication

Requires a valid user JWT token.

Path Parameters

space_id
string
required
UUID of the space.

Request Body

target_version
integer
required
The space state version this patch is based on. Used for optimistic concurrency control.
operations
array
required
Array of patch operations to apply.

Example

curl -X POST https://api.ama2.me/api/v1/spaces/{space_id}/session/patch \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "target_version": 5,
    "operations": [
      {"op": "move", "path": "/actors/uuid/position", "value": {"x": 10, "y": 20}}
    ]
  }'