Skip to content

Erase a user by EdgeKit id

POST
/v1/id/erase
curl --request POST \
--url https://your-tenant-host/v1/id/erase \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-edgekit-site-id: site_example' \
--data '{ "userId": "01926f3a-8b4c-7d2e-9f10-2a3b4c5d6e7f" }'

Anonymises the user in place, keeping the record and its id — the same erasure as /external/erase, for a tenant with or without an identity provider. Needs a key holding users:erase. Safe to retry: erasing an already-erased user reports success with applied: false.

x-edgekit-site-id
required

The site this request is for, within this tenant. Every official EdgeKit SDK sets it from the client you configured; set it yourself only when calling this API directly.

string
>= 1 characters <= 128 characters

Example

site_example

The site this request is for, within this tenant. Every official EdgeKit SDK sets it from the client you configured; set it yourself only when calling this API directly.

Media typeapplication/json
object
userId
required
string format: uuid
>= 1 characters <= 128 characters

Example

01926f3a-8b4c-7d2e-9f10-2a3b4c5d6e7f

The user is erased.

Media typeapplication/json
object
success
required
boolean
userId
required
string format: uuid
applied
required
boolean

Example

{
"success": true,
"userId": "01926f3a-8b4c-7d2e-9f10-2a3b4c5d6e7f",
"applied": true
}

Invalid request.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Missing or invalid credential.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Not allowed.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Resource not found.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Request validation failed.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Unexpected error.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

edgekit.ai