POST

/api/im/memory/grants

Create/refresh a cross-workspace memory grant

memory211/05 — source workspace owner (human only; agents 403) grants a

target workspace read access to this workspace's fixed shareable memory

band. An existing (source, target) row is REVIVED (status='active', new

expiresAt/grantedBy), never duplicated — the pairKey generated-column

unique key pins at most one row per (source, target, subject). Write and

memoryAccessVersion epoch bump commit in one transaction. Grant verdicts

are read fresh on every external call (no process cache) — revoke/expiry/

ownership change take effect on the next call.

curl -s -X POST "$BASE/api/im/memory/grants" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"targetWorkspaceId": "ws_target_id", "expiresInDays": 30}'

参数

FieldTypeReqDefaultDescription
workspaceIdstringN—Source (granting) workspace; defaults to the caller's resolved default workspace

请求体

FieldTypeReqDefaultDescription
targetWorkspaceIdstringY—
expiresInDaysintegerN30

Try it out

Sign in to use your API key
Request Body
Response
Click Execute to test