View as Markdown

Mandate · API reference

Takeover protection

Per-agent baselines, takeover verdicts, the owner's responses and the settings.

Related guide: Prevent agent takeover

The takeover event object

Attributes

idstring
Unique identifier for the object.
objectenum
The type of object. One of takeover_event.
agent_idstring
The agent.
riskenum
The verdict: one signal is elevated; two, or split_use or key_leaked alone, is high. One of elevated, high.
reasonsarray of enums
The reason codes, sorted.
signalsarray of objects
Each signal with a sentence for the owner.
Show child attributes
signalstring
The reason code.
detailstring
What happened.
network_familiesarray of objects
The networks involved, for network signals.
Show child attributes
familystring
cloud:<provider> or net:<period>:<hash>.
namedboolean
Whether it's a named cloud provider.
labelstring
What the console shows (Amazon Web Services, Network 6f1c2a).
actionenum
What the account's settings chose for this risk. One of flag, step_up, suspend, lockdown.
shadowboolean
Recorded in shadow mode: nothing was enforced and nobody was notified.
statusenum
Where the event stands. One of open, cleared, locked_down, recovered.
responseenum
The owner's answer. One of this_was_us, lock_it_down.
responded_atstring | null
When the owner answered.
api_key_idstring | null
The API key that acted when the event opened.
signing_key_idstring | null
The agent signing key that acted, for Identify traffic.
compromised_key_idsarray of strings
Keys a lockdown took out of service; they stay revoked.
network_familiesarray of objects
Every network the signals name.
Show child attributes
familystring
cloud:<provider> or net:<period>:<hash>.
namedboolean
Whether it's a named cloud provider.
labelstring
What the console shows (Amazon Web Services, Network 6f1c2a).
console_urlstring
The event in the console.
window_startstring
When the first signal was raised.
created_atstring
When it was created.
updated_atstring
When it last changed.

The takeover event object

{
  "id": "tko_01M5XPDJXQR46KYMS99XT98SBT",
  "object": "takeover_event",
  "agent_id": "agt_01M5XPDJXQR46KYMS99XT98SBT",
  "risk": "high",
  "reasons": [
    "new_network",
    "rate_spike"
  ],
  "signals": [
    {
      "signal": "new_network",
      "detail": "Activity from a network this agent hasn't used in the last 14 days.",
      "network_families": [
        {
          "family": "net:730:6f1c2a9be04d7713",
          "named": false,
          "label": "Network 6f1c2a"
        }
      ]
    },
    {
      "signal": "rate_spike",
      "detail": "25 authorizations this hour, against a usual 4 an hour."
    }
  ],
  "action": "step_up",
  "shadow": false,
  "status": "open",
  "response": null,
  "responded_at": null,
  "api_key_id": "key_2V1RD54F2D9SFRMTVWHPF0Y6HB",
  "signing_key_id": null,
  "compromised_key_ids": [],
  "network_families": [
    {
      "family": "net:730:6f1c2a9be04d7713",
      "named": false,
      "label": "Network 6f1c2a"
    }
  ],
  "console_url": "http://localhost:5173/mandate/agents?tab=takeover&event=tko_01M5XPDJXQR46KYMS99XT98SBT",
  "window_start": "2026-10-30T12:00:00.000Z",
  "created_at": "2026-10-30T12:00:00.000Z",
  "updated_at": "2026-10-30T12:04:00.000Z"
}

Events

Sent to your webhook endpoints when they subscribe:

  • mandate.agent.takeover_suspected

Read an agent's takeover verdict

GET/v1/mandate/agents/{id}/takeover

The agent's takeover risk and reasons, its learning period, a summary of its baseline, the keys earlier lockdowns took out of service, and its takeover history.

Parameters

idstringpathRequired
Your agent's ID.

Returns

The agent's verdict.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl -s -X POST "$PROVENANCE_API/v1/mandate/agents" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "invoice-bot" }' > step.json
export AGENT_ID=$(jq -r '.id' step.json)
curl "$PROVENANCE_API/v1/mandate/agents/$AGENT_ID/takeover" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "object": "agent_takeover",
  "agent_id": "agt_01M6VQBCJRRTR1RC0DXETH88Z7",
  "takeover_risk": "learning",
  "takeover_reasons": [],
  "learning_until": null,
  "active_event": null,
  "baseline": {
    "hours_observed": 0,
    "network_families": 0,
    "action_types": 0,
    "authorizations": 0
  },
  "compromised_key_ids": [],
  "history": []
}

Read takeover protection settings

GET/v1/mandate/settings/takeover_protection

What happens when an agent looks taken over: the action per risk, enforce or shadow mode, and whether leaked live keys are revoked or only reported.

Parameters

No parameters.

Returns

The settings.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl "$PROVENANCE_API/v1/mandate/settings/takeover_protection" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "object": "takeover_protection",
  "mode": "enforce",
  "elevated_action": "flag",
  "high_action": "step_up",
  "leaked_live_keys": "revoke",
  "updated_at": null
}

Read a takeover event

GET/v1/mandate/takeover_events/{id}

One suspected takeover: the verdict, each signal with its network families, the action, and the owner's response.

Parameters

idstringpathRequired
The event's ID (tko_…).

Returns

The event. See the takeover event object.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl "$PROVENANCE_API/v1/mandate/takeover_events/tko_01M5XPDJXQR46KYMS99XT98SBT" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "id": "tko_01M5XPDJXQR46KYMS99XT98SBT",
  "object": "takeover_event",
  "agent_id": "agt_01M5XPDJXQR46KYMS99XT98SBT",
  "risk": "high",
  "reasons": [
    "new_network",
    "rate_spike"
  ],
  "signals": [
    {
      "signal": "new_network",
      "detail": "Activity from a network this agent hasn't used in the last 14 days.",
      "network_families": [
        {
          "family": "net:730:6f1c2a9be04d7713",
          "named": false,
          "label": "Network 6f1c2a"
        }
      ]
    },
    {
      "signal": "rate_spike",
      "detail": "25 authorizations this hour, against a usual 4 an hour."
    }
  ],
  "action": "step_up",
  "shadow": false,
  "status": "open",
  "response": null,
  "responded_at": null,
  "api_key_id": "key_2V1RD54F2D9SFRMTVWHPF0Y6HB",
  "signing_key_id": null,
  "compromised_key_ids": [],
  "network_families": [
    {
      "family": "net:730:6f1c2a9be04d7713",
      "named": false,
      "label": "Network 6f1c2a"
    }
  ],
  "console_url": "http://localhost:5173/mandate/agents?tab=takeover&event=tko_01M5XPDJXQR46KYMS99XT98SBT",
  "window_start": "2026-10-30T12:00:00.000Z",
  "created_at": "2026-10-30T12:00:00.000Z",
  "updated_at": "2026-10-30T12:04:00.000Z"
}

Change takeover protection settings

PUT/v1/mandate/settings/takeover_protection

Owners and admins, from a console session (an API key is refused, so a stolen key can't turn protection off). Send only the fields to change.

Parameters

modeenum
shadow records what would have happened and changes nothing. One of enforce, shadow.
elevated_actionenum
What an elevated verdict does (default flag). One of flag, step_up.
high_actionenum
What a high verdict does (default step_up). One of flag, step_up, suspend, lockdown.
leaked_live_keysenum
What a reported live API key does (default revoke). One of revoke, notify_only.

Returns

The settings.

Errors

export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe
curl -X PUT "$PROVENANCE_API/v1/mandate/settings/takeover_protection" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "mode": "shadow" }'

Response 200

{
  "object": "takeover_protection",
  "mode": "shadow",
  "elevated_action": "flag",
  "high_action": "step_up",
  "leaked_live_keys": "revoke",
  "updated_at": "2026-10-30T12:00:00.000Z"
}

List takeover events

GET/v1/mandate/takeover_events

Suspected takeovers, newest first, including shadow-mode events (shadow: true).

Parameters

agent_idstringquery
Only this agent's events.
statusstringquery
Comma-separated statuses: open, cleared, locked_down, recovered.
limitintegerquery
Page size, 1–100 (default 20). Outside the range → 400 parameter_invalid.
cursorstringquery
Opaque; pass a response's next_cursor back to get the next page.

Returns

A page of takeover events.

Errors

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
curl "$PROVENANCE_API/v1/mandate/takeover_events" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "object": "list",
  "data": [],
  "has_more": false,
  "next_cursor": null
}

This was us

POST/v1/mandate/takeover_events/{id}/clear

Trust the event's networks, clear its other signals for 2 hours, resume an agent the event suspended, and record the answer in the ledger. Owners and admins, from a console session.

Parameters

idstringpathRequired
The event's ID (tko_…).

Returns

The cleared event. See the takeover event object.

Errors

export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe
curl -X POST "$PROVENANCE_API/v1/mandate/takeover_events/tko_01M5XPDJXQR46KYMS99XT98SBT/clear" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "id": "tko_01M5XPDJXQR46KYMS99XT98SBT",
  "object": "takeover_event",
  "agent_id": "agt_01M5XPDJXQR46KYMS99XT98SBT",
  "risk": "high",
  "reasons": [
    "new_network",
    "rate_spike"
  ],
  "signals": [
    {
      "signal": "new_network",
      "detail": "Activity from a network this agent hasn't used in the last 14 days.",
      "network_families": [
        {
          "family": "net:730:6f1c2a9be04d7713",
          "named": false,
          "label": "Network 6f1c2a"
        }
      ]
    },
    {
      "signal": "rate_spike",
      "detail": "25 authorizations this hour, against a usual 4 an hour."
    }
  ],
  "action": "step_up",
  "shadow": false,
  "status": "cleared",
  "response": "this_was_us",
  "responded_at": "2026-10-30T12:06:00.000Z",
  "api_key_id": "key_2V1RD54F2D9SFRMTVWHPF0Y6HB",
  "signing_key_id": null,
  "compromised_key_ids": [],
  "network_families": [
    {
      "family": "net:730:6f1c2a9be04d7713",
      "named": false,
      "label": "Network 6f1c2a"
    }
  ],
  "console_url": "http://localhost:5173/mandate/agents?tab=takeover&event=tko_01M5XPDJXQR46KYMS99XT98SBT",
  "window_start": "2026-10-30T12:00:00.000Z",
  "created_at": "2026-10-30T12:00:00.000Z",
  "updated_at": "2026-10-30T12:04:00.000Z"
}

Lock it down

POST/v1/mandate/takeover_events/{id}/lock_down

Suspend the agent, revoke its sessions and outstanding tokens, and list the API keys and signing keys to rotate (rotation). Counts as an owner-confirmed takeover on the agent's network record.

Parameters

idstringpathRequired
The event's ID (tko_…).

Returns

The locked-down event, what was revoked, and the keys to rotate.

Errors

export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe
curl -X POST "$PROVENANCE_API/v1/mandate/takeover_events/tko_01M5XPDJXQR46KYMS99XT98SBT/lock_down" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "id": "tko_01M5XPDJXQR46KYMS99XT98SBT",
  "object": "takeover_event",
  "agent_id": "agt_01M5XPDJXQR46KYMS99XT98SBT",
  "risk": "high",
  "reasons": [
    "new_network",
    "rate_spike"
  ],
  "signals": [
    {
      "signal": "new_network",
      "detail": "Activity from a network this agent hasn't used in the last 14 days.",
      "network_families": [
        {
          "family": "net:730:6f1c2a9be04d7713",
          "named": false,
          "label": "Network 6f1c2a"
        }
      ]
    },
    {
      "signal": "rate_spike",
      "detail": "25 authorizations this hour, against a usual 4 an hour."
    }
  ],
  "action": "step_up",
  "shadow": false,
  "status": "locked_down",
  "response": "lock_it_down",
  "responded_at": "2026-10-30T12:06:00.000Z",
  "api_key_id": "key_2V1RD54F2D9SFRMTVWHPF0Y6HB",
  "signing_key_id": null,
  "compromised_key_ids": [
    "key_2V1RD54F2D9SFRMTVWHPF0Y6HB"
  ],
  "network_families": [
    {
      "family": "net:730:6f1c2a9be04d7713",
      "named": false,
      "label": "Network 6f1c2a"
    }
  ],
  "console_url": "http://localhost:5173/mandate/agents?tab=takeover&event=tko_01M5XPDJXQR46KYMS99XT98SBT",
  "window_start": "2026-10-30T12:00:00.000Z",
  "created_at": "2026-10-30T12:00:00.000Z",
  "updated_at": "2026-10-30T12:04:00.000Z",
  "revoked": {
    "sessions": 3,
    "tokens": 25
  },
  "rotation": [
    {
      "key_id": "key_2V1RD54F2D9SFRMTVWHPF0Y6HB",
      "kind": "api_key",
      "rotated": false,
      "how": "POST /v1/account/keys/{id}/rotate_secret with this key id (Developers → API keys → Rotate)"
    }
  ]
}

Resume a locked-down agent

POST/v1/mandate/takeover_events/{id}/recover

Once every key in compromised_key_ids is rotated or revoked: resume the agent with a fresh baseline (the hours since the first signal are dropped; older ones stay). The keys stay revoked.

Parameters

idstringpathRequired
The event's ID (tko_…).

Returns

The recovered event. See the takeover event object.

Errors

export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe
curl -X POST "$PROVENANCE_API/v1/mandate/takeover_events/tko_01M5XPDJXQR46KYMS99XT98SBT/recover" \
  -H "Authorization: Bearer $PROVENANCE_KEY"

Response 200

{
  "id": "tko_01M5XPDJXQR46KYMS99XT98SBT",
  "object": "takeover_event",
  "agent_id": "agt_01M5XPDJXQR46KYMS99XT98SBT",
  "risk": "high",
  "reasons": [
    "new_network",
    "rate_spike"
  ],
  "signals": [
    {
      "signal": "new_network",
      "detail": "Activity from a network this agent hasn't used in the last 14 days.",
      "network_families": [
        {
          "family": "net:730:6f1c2a9be04d7713",
          "named": false,
          "label": "Network 6f1c2a"
        }
      ]
    },
    {
      "signal": "rate_spike",
      "detail": "25 authorizations this hour, against a usual 4 an hour."
    }
  ],
  "action": "step_up",
  "shadow": false,
  "status": "recovered",
  "response": "lock_it_down",
  "responded_at": "2026-10-30T12:06:00.000Z",
  "api_key_id": "key_2V1RD54F2D9SFRMTVWHPF0Y6HB",
  "signing_key_id": null,
  "compromised_key_ids": [
    "key_2V1RD54F2D9SFRMTVWHPF0Y6HB"
  ],
  "network_families": [
    {
      "family": "net:730:6f1c2a9be04d7713",
      "named": false,
      "label": "Network 6f1c2a"
    }
  ],
  "console_url": "http://localhost:5173/mandate/agents?tab=takeover&event=tko_01M5XPDJXQR46KYMS99XT98SBT",
  "window_start": "2026-10-30T12:00:00.000Z",
  "created_at": "2026-10-30T12:00:00.000Z",
  "updated_at": "2026-10-30T12:04:00.000Z"
}

Was this page helpful? Send us feedback

LLM? Read llms.txt.