Skip to main content
PATCH
/
alignment
/
agent
/
{agent_id}
/
audit
Update audit settings
curl --request PATCH \
  --url https://api.mnemom.ai/v1/alignment/agent/{agent_id}/audit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --header 'If-Match: <if-match>' \
  --data '
{
  "trace_format": "<string>",
  "retention_days": 123,
  "queryable": true,
  "query_endpoint": "<string>",
  "storage": {}
}
'
{
  "ok": true,
  "scope_id": "<string>",
  "value": {
    "retention_days": 123,
    "queryable": true,
    "trace_format": "<string>",
    "query_endpoint": "<string>",
    "storage": {}
  },
  "content_hash": "<string>",
  "version": 2,
  "field_provenance": {},
  "_warnings": {}
}

Authorizations

Authorization
string
header
required

Supabase JWT token in Authorization: Bearer header

Headers

Idempotency-Key
string
required

Client-supplied idempotency token. Replays within 24 hours return the stored result verbatim. See ADR-023.

Required string length: 1 - 128
If-Match
string
required

Optimistic concurrency token. Pass the ETag from a recent GET ("sha256:<hex64>" shape). A stale ETag returns 412 Precondition Failed; a missing header returns 428 Precondition Required. See RFC 9110 §13.1.1.

Pattern: ^"sha256:[0-9a-f]{64}"$

Path Parameters

agent_id
string
required

Agent identifier (e.g. smolt-abc123)

Body

application/json
trace_format
string
retention_days
integer
queryable
boolean
query_endpoint
string
tamper_evidence
enum<string> | null
Available options:
append_only,
signed,
merkle,
null
storage
object

Response

The audit primitive was updated at the agent scope.

ok
boolean
required
scope
enum<string>
required
Available options:
agent
scope_id
string
required
resource
enum<string>
required
Available options:
alignment
primitive
enum<string>
required
Available options:
audit
verb
enum<string>
required
Available options:
put,
patch
value
object
required
content_hash
string
required

New sha256:<hex64> of the spec at this scope after the write.

version
integer
Required range: x >= 1
field_provenance
object
_warnings
object

Pre-existing structural issues outside the modified primitive. Present only when the existing spec carries unrelated validation problems; never blocks the write.