openmemory
Docs
Actions

Propose an action that needs approval

POST
/v1/actions

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.

Authorization

headerAuthorizationBearer <token>

Your space key (om_...). Create one with POST /v1/spaces.

Request Body

application/json
  1. body
class*string

Kind of action, e.g. email_reply, calendar_hold.

Length1 <= length <= 64
summary*string

One line the owner reads when approving.

Length1 <= length <= 1000
payload*

Exactly what will be executed.

preconditions?array<unknown>
Itemsitems <= 20
Default[]
meta?
Default{}
idempotency_key*string

Same key + same payload returns the existing action, in whatever status it is now, including denied. To ask again after a denial, use a new key.

Length1 <= length <= 200
expires_at?|
Formatdate-time

Response Body

Already proposed with this key

application/json
  1. response
action*
created*boolean
Example Request
curl -X POST 'https://api.openmemory.sh/v1/actions' \  -H 'Content-Type: application/json' \  -d '{  "class": "string",  "summary": "string",  "payload": {    "property1": null,    "property2": null  },  "idempotency_key": "string"}'
Example Response
{  "action": {    "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"  },  "created": true}