# End a Session

End one of the signed-in user's own sessions — a lost phone, a shared computer. Every role may end its own.

## Overview

- `sessionId` is an `id` from [Your Sessions](https://docs.aureahub.com/docs/auth-sessions.md).
- From then on the session's refresh token is refused (`401`; `REFRESH_TOKEN_REVOKED` where your tenant has stable codes on every error [Coming soon, upon request](https://docs.aureahub.com/docs/feature-availability.md)). Its access token is refused at once where sessions are checked on every request, and otherwise stops working when it expires — at most 15 minutes ([Authentication › Token Lifetimes](https://docs.aureahub.com/docs/authentication.md)).
- Ending the `current` session signs the caller out, as [Log Out](https://docs.aureahub.com/docs/auth-logout.md) does.
- `404` `SESSION_NOT_FOUND` when no active session of the caller has this id — one already ended, another user's, or none at all are answered alike.
- 20 requests per minute ([Rate Limits](https://docs.aureahub.com/docs/rate-limiting.md)).

## Endpoint

### `DELETE /v1/auth/sessions/{sessionId}`

Authentication: bearer token required.

Ends one of the caller's active sessions. No body; answers 204.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `sessionId` | string (uuid) | yes | The session's `id` |

**Responses**

`204` Ended

`404` Not Found

```json
{
  "statusCode": 404,
  "error": "NotFoundError",
  "message": "No active session of yours has this id",
  "details": { "code": "SESSION_NOT_FOUND" }
}
```

**Example request**

```bash
curl -X DELETE https://api.aureahub.com/v1/auth/sessions/7e3a9c51-2d4b-4f86-a0e1-6b5c4d3e2f1a \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

---

Web version: https://docs.aureahub.com/#auth-session-end
