Skip to main content
PUT
/
orgs
/
{org_id}
/
protection-template
Publish or replace the org protection template
curl --request PUT \
  --url https://api.mnemom.ai/v1/orgs/{org_id}/protection-template \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '
{
  "card_version": "<string>",
  "agent_id": "<string>",
  "mode": "off",
  "thresholds": {
    "warn": 123,
    "quarantine": 123,
    "block": 123
  },
  "screen_surfaces": [
    "<string>"
  ],
  "trusted_sources": [
    {
      "pattern": "<string>",
      "trust_tier": "high",
      "risk_multiplier": 123
    }
  ],
  "_composition": {
    "canonical_id": "<string>",
    "composed_at": "2023-11-07T05:31:56Z",
    "scopes_applied": [
      {
        "scope": "<string>",
        "version": 123,
        "template_version": 123,
        "card_id": "<string>"
      }
    ],
    "exemptions_applied": [
      "<string>"
    ],
    "source_card_id": "<string>",
    "source_policy_id": "<string>"
  }
}
'
{
  "org_id": "<string>",
  "template": {
    "card_version": "<string>",
    "agent_id": "<string>",
    "values": {
      "declared": [
        "<string>"
      ],
      "definitions": {},
      "conflicts_with": [
        "<string>"
      ],
      "hierarchy": "lexicographic"
    },
    "autonomy": {
      "bounded_actions": [
        "<string>"
      ],
      "escalation_triggers": [
        {
          "condition": "<string>",
          "action": "escalate",
          "reason": "<string>"
        }
      ],
      "forbidden_actions": [
        "<string>"
      ],
      "max_autonomous_value": {
        "amount": 123,
        "currency": "<string>"
      }
    },
    "audit": {
      "retention_days": 123,
      "queryable": true,
      "trace_format": "<string>",
      "query_endpoint": "<string>",
      "tamper_evidence": "append_only",
      "storage": {
        "type": "local",
        "location": "<string>"
      }
    },
    "card_id": "<string>",
    "issued_at": "2023-11-07T05:31:56Z",
    "expires_at": "2023-11-07T05:31:56Z",
    "principal": {
      "type": "human",
      "relationship": "delegated_authority",
      "identifier": "<string>",
      "escalation_contact": "<string>"
    },
    "conscience": {
      "mode": "augment",
      "values": [
        {
          "type": "BOUNDARY",
          "content": "<string>",
          "id": "<string>",
          "severity": "advisory"
        }
      ]
    },
    "integrity": {
      "enforcement_mode": "observe"
    },
    "capabilities": {},
    "enforcement": {
      "forbidden_tools": [
        {
          "pattern": "<string>",
          "reason": "<string>",
          "severity": "critical"
        }
      ],
      "unmapped_tool_action": "allow",
      "fail_open": true,
      "mode": "off",
      "grace_period_hours": 123
    },
    "extensions": {},
    "_composition": {
      "canonical_id": "<string>",
      "composed_at": "2023-11-07T05:31:56Z",
      "scopes_applied": [
        {
          "scope": "<string>",
          "version": 123,
          "template_version": 123,
          "card_id": "<string>"
        }
      ],
      "exemptions_applied": [
        "<string>"
      ],
      "source_card_id": "<string>",
      "source_policy_id": "<string>"
    }
  },
  "enabled": true,
  "agents_flagged_for_recompose": 123
}

Authorizations

Authorization
string
header
required

Supabase JWT token in Authorization: Bearer header

Headers

Idempotency-Key
string
required

Path Parameters

org_id
string
required

Organization identifier (e.g. org-abc12345)

Body

UC-4 unified protection card (ADR-008). Safe House thresholds + trusted-source policy for a single agent.

card_version
string
required
agent_id
string
required
mode
enum<string>
required
Available options:
off,
observe,
enforce,
enforce_sync,
sovereign
thresholds
object
required
screen_surfaces
string[]
required
trusted_sources
object[]
required
_composition
object

System-managed block describing which scope sources merged into the canonical card. Only returned when ?include_composition=true.

Response

Template stored and propagated.

org_id
string
required
template
object
required

UC-4 unified alignment card (ADR-008). Authored in YAML or JSON; composed server-side with platform defaults, org template, and active exemptions before storage.

enabled
boolean
required
agents_flagged_for_recompose
integer