Skip to content

Approve an erasure request (performs the hard delete)

POST
/v1/erasure-requests/{id}/approve
curl --request POST \
--url https://api.aerandil.com/v1/erasure-requests/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/approve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "decision_note": "example" }'

Hard-delete the request’s target object and every link involving it in one transaction, then record the decision on the request row. Requires erasure:approve. The erase happens before the record: a retried approve after a partial failure finds the target already absent and still records a truthful decision (target_found = false). events is never touched.

id
required
string format: uuid
Media typeapplication/json
object
decision_note

Reviewer’s note; recorded on the request row under the internal.restricted marking.

string
Examplegenerated
{
"decision_note": "example"
}

Decision recorded.

Media typeapplication/json
object
id
required
string format: uuid
links_removed

Approve only: number of links rows cascade-deleted with the object (in- and out-edges combined). Recorded on the request row for the compliance audit.

integer
status
required
string
Allowed values: approved rejected
target_found

Approve only: false when the target was already absent (a retried approve after a partial failure, or an out-of-band deletion) — the decision is still recorded truthfully with links_removed = 0.

boolean
Example
{
"status": "approved"
}
Cache-Control
string
Allowed value: no-store

Always no-store.

No such erasure request for this tenant.

Media typeapplication/json

Structured error wrapper. Every non-2xx response from any Aerandil endpoint serialises to this shape; the HTTP status carries the failure class (4xx/5xx), the body adds a stable code for programmatic dispatch plus a human-readable message.

object
error
required
object
code
required

Stable, programmatic error code (e.g. unauthorized, forbidden, not_found, invalid_body, invalid_url, precondition_failed, no_secondary_key). Clients dispatch on code, not on the message (which may be localised or contextualised in future versions).

string
instance_id

Request-id correlation handle echoed on the request-id response header — support teams correlate without scraping logs.

string
message
required

Human-readable explanation of the failure.

string
parameters

Per-error structured detail. The shape varies by code (e.g. forbidden_action carries {"action": "..."}; precondition_failed carries {"current_version": N}).

Examplegenerated
{
"error": {
"code": "example",
"instance_id": "example",
"message": "example",
"parameters": "example"
}
}

Request already decided — erasure_request_not_pending.

Media typeapplication/json

Structured error wrapper. Every non-2xx response from any Aerandil endpoint serialises to this shape; the HTTP status carries the failure class (4xx/5xx), the body adds a stable code for programmatic dispatch plus a human-readable message.

object
error
required
object
code
required

Stable, programmatic error code (e.g. unauthorized, forbidden, not_found, invalid_body, invalid_url, precondition_failed, no_secondary_key). Clients dispatch on code, not on the message (which may be localised or contextualised in future versions).

string
instance_id

Request-id correlation handle echoed on the request-id response header — support teams correlate without scraping logs.

string
message
required

Human-readable explanation of the failure.

string
parameters

Per-error structured detail. The shape varies by code (e.g. forbidden_action carries {"action": "..."}; precondition_failed carries {"current_version": N}).

Examplegenerated
{
"error": {
"code": "example",
"instance_id": "example",
"message": "example",
"parameters": "example"
}
}