Emend
Hosted Enterprise

Governance API

Enterprise RTBF export, erase, and purge-operation status endpoints.

The governance API exposes enterprise RTBF operations under /api/governance.

Authorization
These endpoints require a governance-authorized dashboard or session bearer credential for the target organization. Ordinary production API keys are rejected.
POST /api/governance/export-usermethod

Export User

curl -X POST "${EMEND_URL:-https://www.emend.online}/api/governance/export-user" \  -H "Authorization: Bearer $EMEND_GOVERNANCE_BEARER" \  -H "Content-Type: application/json" \  --data @- <<'JSON'{  "user_id": "alice",  "request_id": "support-ticket-123"}JSON

Returns the user's export bundle and minimized subject_ref. Durable audit rows store minimized references and counts, not raw bearer tokens.

POST /api/governance/erase-usermethod

Erase User

curl -X POST "${EMEND_URL:-https://www.emend.online}/api/governance/erase-user" \  -H "Authorization: Bearer $EMEND_GOVERNANCE_BEARER" \  -H "Content-Type: application/json" \  --data @- <<'JSON'{  "user_id": "alice",  "request_id": "support-ticket-123"}JSON

Repeating the same user_id and request_id returns the same purge operation identity. A completed response is returned only after the subject write barrier, deletes, final empty check, and ERASE ok audit write succeed.

Agent playbooks are org-owned
Aggregated agent playbooks are treated as org-owned artifacts. User erasure removes user-owned data and source-window links to erased user playbooks, but does not automatically hide, rebuild, or delete agent playbooks.
GET /api/governance/purge-operations/{purge_id}method

Purge Operation Status

curl -X GET "${EMEND_URL:-https://www.emend.online}/api/governance/purge-operations/purge_abc" \  -H "Authorization: Bearer $EMEND_GOVERNANCE_BEARER"

Returns minimized purge state only:

{  "purge_id": "purge_abc",  "subject_ref": "subref_v1_abc",  "request_ref": "reqref_v1_abc",  "status": "complete",  "error_code": null,  "error_detail": null,  "created_at": 1710000000,  "updated_at": 1710000005,  "completed_at": 1710000005}
PropType
purge_idstring
subject_refstring
request_refstring
statusstring
error_codestring | null
error_detailstring | null
created_atinteger
updated_atinteger
completed_atinteger | null
Info
This phase does not expose audit-event listing.