List bulk user deletion results
GET /v1/jobs/user-deletions/{job_id}/results · permission users:delete
Lists the outcome of each user in a bulk user deletion job, in request order (position starts at 1). Each result is one of:
pending: the user has no outcome yet.succeeded: the user's deletion was started;deletion_idis the same id thatDELETE /v1/users/{user_id}returns for that user.not_found: the user did not exist in this environment, or was already deleted.failed: the deletion failed after several attempts;error_codeisinternal. Delete the user again individually or in a new job.
Results hold user ids only; no other personal data is returned. The list only pages forward: use list_metadata.after for the next page; before and order are not supported.
Request
| Parameter | In | Required | Description |
|---|---|---|---|
job_id |
path | yes | Job id, prefixed job_. |
limit |
query | no | Page size, 1 to 100. Default 20. |
after |
query | no | Opaque cursor from list_metadata.after. Only valid for the same job. |
Response
200 OK. list_metadata.after is the cursor for the next page (null on the last page); list_metadata.before is always null.
{
"data": [
{
"position": 1,
"user_id": "usr_01h455vb4pex5vsknk084sn02q",
"status": "succeeded",
"deletion_id": "0191f0a0-0000-8000-8000-000000000001"
},
{
"position": 2,
"user_id": "usr_01h455vb4pex5vsknk084sn02r",
"status": "not_found"
}
],
"list_metadata": { "before": null, "after": null }
}
Errors
Every error is an application/problem+json body with a stable code.
| HTTP | code |
When |
|---|---|---|
| 400 | invalid_cursor |
The cursor is malformed, expired or belongs to another job. |
| 401 | unauthenticated |
The API key is missing, invalid or revoked. |
| 403 | insufficient_permissions |
The key lacks the users:delete permission. |
| 404 | not_found |
The job does not exist in this environment (or the id is malformed). |
| 422 | validation_failed |
limit is out of range, or before or order was sent (not_supported). |
| 429 | rate_limited |
The rate limit was exceeded; honor Retry-After. |
| 503 | service_unavailable |
A dependency is temporarily unavailable; retry later. |
Example
curl "https://api.eu.keenauth.com/v1/jobs/user-deletions/job_01h455vb4pex5vsknk084sn02q/results?limit=100" \
-H "Authorization: Bearer $KEENAUTH_SECRET_KEY"
CLI: keenauth jobs user-deletions results job_01h455vb4pex5vsknk084sn02q --limit 100