Delete a User
DELETE
/api/v1/admin/users/{id}
const url = 'https://example.com/api/v1/admin/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'DELETE', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"archive_days":1,"policy":"archive"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://example.com/api/v1/admin/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "archive_days": 1, "policy": "archive" }'Deletes a User. It requires a signed-in User with the admin scope and the admin or owner Role. It can return 400 if the request is invalid, 401 if the session is missing or expired, 403 if access is denied and 409 if the request conflicts with the current state. Route: /api/v1/admin/users/{id}. Inputs: id. A recent account assertion is required. Do not automatically replay this operation after an uncertain result.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Media typeapplication/json
object
state
required
string
user_id
required
string format: uuid
Example
{ "state": "pending"}