Undo a wrong retirement in one call: the decision is active again.
Only the decision's own owner can restore it, and only when it was retired by a replacement. The replacement stays
active. Only the link between them is undone (kept in history with who restored it, when and why). Refused with
nothing changed: 404 not found (also another workspace or tenant), 403 another user's decision or no user
identity, 409 not retired, scheduled, replaced again since (newer_decision_id names the newer record) or
replacement unreadable. A failed write answers 500 with code restore_rolled_back (every part read back as
before), restore_record_erased (the record was erased while the restore ran) or restore_incomplete
(state says what the record, its links and its history read as now).
Send Authorization: Bearer <token>. The token is either a Clerk session JWT or a SmartMemory API key (prefix sm_live_, sm_test_, or legacy sk_).
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Request to restore a decision that was wrongly retired by a replacement.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/memory/decisions/string/restore" \ -H "Content-Type: application/json" \ -d '{ "reason": "string" }'null{
"detail": {
"code": "invalid_scoped_validity",
"message": "string",
"retryable": false
}
}{
"detail": {
"code": "invalid_scoped_validity",
"message": "string",
"retryable": false
}
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}{
"detail": {
"code": "invalid_scoped_validity",
"message": "string",
"retryable": false
}
}