> ## Documentation Index
> Fetch the complete documentation index at: https://iam-docs.razi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete a User

<Warning>
  This flow can be executed using a human or a machine user.

  <b>For machine users</b>:

  * Send a valid `Authorization` header with of type `Bearer TOKEN_VALUE` where **TOKEN\_VALUE** is the a JWT returned in the response from [Machine User Token](/api-tutorials/unauthenticated-flows/generate-machine-user-token) flow
</Warning>

<Note>
  This API Will delete user from the app, if you want to delete user from an organization, use [Link](/api-tutorials/multi-tenancy/machine-user/delete-user-from-organization).
</Note>

Use the below endpoint to delete a user.

```bash
curl --request DELETE \
  --url https://dev-iam.razi.ai/v1/authorization/users/__USERID__ \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'X-App-Name: '
```

Upon successful request, you will receive a response similar to the below:

```json
{
    "message": "User Deleted"
}

```

<Tip>
  [Link to Playground](https://dev-iam.razi.ai/docs#tag/authorization/DELETE/v1/authorization/users/\{userId})
</Tip>
