Decrees
Decrees represent external interventions such as policy changes or sudden events. This REST API stores decree records and broadcasts their submission to event subscribers. Submitting a decree does not apply its payload to the simulation engine or schedule it for a later tick.
All decree endpoints require authentication. API keys need the stated scope. Scope checks do not apply to JWT callers. API keys access their own organization’s simulations. JWT callers need organization membership or ownership of a personal simulation.
Replace <api-key> and <simulation-id> with your key and simulation UUID.
The example capability_jump payload illustrates stored data. The endpoint does not validate or execute that domain event.
Submit Decree
Section titled “Submit Decree”POST /v1/simulations/{id}/decreesStores a decree for an accessible simulation and emits a decree event. The endpoint does not require the simulation to be active.
Successful responses support an Idempotency-Key, subject to the idempotency limitations.
Scope required (API key): simulation:write
Path Parameters
Section titled “Path Parameters”| Parameter | Type | Description |
|---|---|---|
id | uuid | Simulation ID |
Request Body
Section titled “Request Body”| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Nonempty decree type identifier |
payload | object | Yes | Free-form decree data |
Unknown top-level fields return 400 VALIDATION_ERROR.
Both endpoints can return 401, 403, 404, 429, or 500. Invalid submit bodies return 400, and conflicting idempotency keys return 409.
See HTTP Status Codes for shared errors.
Response 201
Section titled “Response 201”{ "id": "d1e2f3a4-1111-4111-8111-111111111111", "simulationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "type": "capability_jump", "payload": { "target": "frontier_model", "magnitude": 0.4 }, "createdAt": "2025-06-15T10:35:00.000Z"}Example
Section titled “Example”curl -X POST "https://api.anankelabs.io/v1/simulations/<simulation-id>/decrees" \ -H "X-Api-Key: <api-key>" \ -H "Content-Type: application/json" \ -d '{ "type": "capability_jump", "payload": {"target": "frontier_model", "magnitude": 0.4} }'List Decrees
Section titled “List Decrees”GET /v1/simulations/{id}/decreesReturns a paginated list of all decrees submitted to a simulation.
Scope required (API key): simulation:read
Path Parameters
Section titled “Path Parameters”| Parameter | Type | Description |
|---|---|---|
id | uuid | Simulation ID |
Query Parameters
Section titled “Query Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 50 | Results per page, clamped to 1 to 200 |
offset | integer | 0 | Pagination offset, clamped to 0 or greater |
order | string | "asc" | Creation-time order: "asc" or "desc" |
limit and offset use integer parsing. Zero or an unparseable limit uses 50. An unparseable offset uses 0.
Only order=desc selects descending order. All other values select ascending order.
Response
Section titled “Response”{ "data": [ { "id": "d1e2f3a4-1111-4111-8111-111111111111", "simulationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "type": "capability_jump", "payload": { "target": "frontier_model", "magnitude": 0.4 }, "createdAt": "2025-06-15T10:35:00.000Z" } ], "pagination": { "limit": 50, "offset": 0, "total": 1 }}Example
Section titled “Example”curl "https://api.anankelabs.io/v1/simulations/<simulation-id>/decrees?order=desc" \ -H "X-Api-Key: <api-key>"