POST
org-erasure/
User APIService tier
POST to org-erasure/. derived from route
URL
- User APIhttps://contracts.mattering.io/api/user/v1/org-erasure/
- Service tierhttps://contracts.mattering.io/api/internal/org-erasure/
Body keys (JSON)
| Key | Required | Default |
|---|---|---|
_email | optional or conditional | none |
_org_id | optional or conditional | none |
email | optional or conditional | none |
org_id | optional or conditional | none |
Keys the view reads. A key not in this list is ignored by the view. Where a key is required only for some actions (for example the action dispatch), the description above says which.
Responses
200 bare JSON object (no envelope)
{
"data": {
"app": "...",
"deleted": true,
"anonymised": "...",
"retained": "...",
"files": [
"..."
]
},
"meta": {
"dry_run": "...",
"more": true
}
}
409 bare JSON object (no envelope)
...
Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).
Errors
| Status | Code |
|---|---|
| 401 | unauthorized |
| 500 | files_failed |
Example
curl -X POST "https://contracts.mattering.io/api/user/v1/org-erasure/" \
-H "Authorization: Bearer $MATTERING_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"_email": "...",
"_org_id": "...",
"email": "...",
"org_id": "..."
}'curl -X POST "https://contracts.mattering.io/api/internal/org-erasure/" \
-H "X-Internal-Secret: $MATTERING_INTERNAL_API_SECRET" \
-H "X-Internal-Org-Id: $ORG_ID" \
-H "X-Internal-User-Email: you@example.com" \
-H "Content-Type: application/json" \
-d '{
"_email": "...",
"_org_id": "...",
"email": "...",
"org_id": "..."
}'
Source: ContractsCore/data_rights.py (data_rights.org_erasure_view)