> ## 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.

# Sign Out User

<Warning>
  The user has to be logged in to proceed with this flow.

  Make sure to either:

  * Send a valid `Authorization` header with of type `Bearer TOKEN_VALUE` where **TOKEN\_VALUE** is the token returned in the response from [Sign up](/api-tutorials/unauthenticated-flows/sign-up-by-username-password#sign-up-a-user) or [Sign in](/api-tutorials/unauthenticated-flows/sign-in-by-username-password) flow
  * In case your app supports cookie, you can enable request cookies as our API Automatically sets a cookie named `session-token` which is forwarded with each request to our api.
</Warning>

In order to sign out a user, the below endpoint can be used

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

This API call will return a 204 status if session is terminated successfully.

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

  In the above url the `__SESSIONID__` is the value of `sessionId` key from response of [Sign up](/api-tutorials/unauthenticated-flows/sign-up-by-username-password) or [Sign in](/api-tutorials/unauthenticated-flows/sign-in-by-username-password) flow
</Tip>
