Deployments.ai Docs
Governance

Erase tenant data

POST /v1/organizations/{id}/erasures · SDK createTenantErasure · CLI deployments governance erase

POST
/v1/organizations/{id}/erasures

Requires governance:write. A suspended organization can still call it, except while an abuse hold preserves evidence.

Authorization

platformBearer
headerAuthorizationBearer <token>

Platform bearer credential accepted as an opaque API key or JWT.

Path Parameters

id*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Header Parameters

x-deployments-organization*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
idempotency-key*string
Length1 <= length <= 512

Request Body

application/json
  1. body
confirmation*"ERASE"
Value in"ERASE"

Response Body

TenantErasureResponse

application/json
  1. response
completedAt?string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
createdAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
error?
expiresAt?string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
id*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
organizationId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
startedAt?string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
status*string
Value in"canceled""completed""failed""pending""running"
summary?
updatedAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
version*integer
Range1 <= value
kind*"tenant-erasure"
Value in"tenant-erasure"
output?
curl -X POST "https://example.com/v1/organizations/string/erasures" \  -H "x-deployments-organization: string" \  -H "idempotency-key: string" \  -H "Content-Type: application/json" \  -d '{    "confirmation": "ERASE"  }'
{  "completedAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "error": {    "property1": null,    "property2": null  },  "expiresAt": "2019-08-24T14:15:22Z",  "id": "string",  "organizationId": "string",  "startedAt": "2019-08-24T14:15:22Z",  "status": "canceled",  "summary": {    "auditRootHash": "string",    "memorySearch": {      "backupsExpireBy": "2019-08-24T14:15:22Z"    },    "observability": {      "backupsExpireBy": "2019-08-24T14:15:22Z",      "clickhouseRowsDeleted": 0,      "icebergRowsDeleted": 0,      "physicalRemovalBy": "2019-08-24T14:15:22Z"    },    "recordsDeleted": 0  },  "updatedAt": "2019-08-24T14:15:22Z",  "version": 1,  "kind": "tenant-erasure",  "output": {    "downloadUrl": "string",    "downloadUrlExpiresAt": "2019-08-24T14:15:22Z",    "fileName": "string",    "sha256": "string",    "sizeBytes": 0,    "archiveDownloadUrl": "string",    "archiveDownloadUrlExpiresAt": "2019-08-24T14:15:22Z",    "archiveFileName": "string",    "archiveSha256": "string",    "archiveSizeBytes": 0,    "contentType": "application/json",    "immutable": true  }}