Move an action to a new status, only if it is still in `from`
Compare-and-set: two callers cannot both move A7 from approved to executing. Allowed: pending→approved|executing|denied|expired|superseded|blocked, approved→executing|denied|expired|superseded, executing→done|failed, blocked→pending|denied|superseded, failed→pending. Expired actions cannot be approved or executed.
AuthorizationBearer <token>Your space key (om_...). Create one with POST /v1/spaces.
id*stringShort action id, e.g. A7
1 <= length <= 32application/json- body
from*stringThe status you expect the action to be in now.
"pending""approved""executing""done""failed""denied""expired""superseded""blocked"to*ActionStatus"pending""approved""executing""done""failed""denied""expired""superseded""blocked"receipt?What the execution did. Usually sent with to=done or to=failed.
Moved
application/json- response
id*stringclass*stringsummary*stringpayload*payload_hash*stringpreconditions*array<unknown>meta*idempotency_key*stringstatus*ActionStatus"pending""approved""executing""done""failed""denied""expired""superseded""blocked"receipt*|nullexpires_at*string|nullcreated_at*stringupdated_at*stringcurl -X POST 'https://api.openmemory.sh/v1/actions/string/transition' \ -H 'Content-Type: application/json' \ -d '{ "from": "pending", "to": "pending"}'{ "id": "string", "class": "string", "summary": "string", "payload": { "property1": null, "property2": null }, "payload_hash": "string", "preconditions": [ null ], "meta": { "property1": null, "property2": null }, "idempotency_key": "string", "status": "pending", "receipt": { "property1": null, "property2": null }, "expires_at": "string", "created_at": "string", "updated_at": "string"}Propose an action that needs approval POST
Gets a short id (A1, A2, ...) and status 'pending'. Reusing an idempotency_key with the same payload returns the existing action, in whatever status it is now, including denied; with a different payload it is a 409. To ask again after a denial, use a new key.
Change an action's meta PATCH
Merges into meta, in any status, for example to keep a chat message id with the action. Set a field to null to remove it. Nothing else can be changed: what the owner approved stays as it was.