# Revoke sessions

Canonical page: https://docs.ovok.com/api/authentication---session-management/revoke-sessions

`DELETE /auth/session/{option}`

Signs the caller out of one or more sessions. Use it for "sign out everywhere" and "sign out other devices" actions.

**Auth:** bearer token.
**Scope:** the signed-in user's own sessions. A session ID that is not one of the caller's sessions revokes nothing.

## Behaviour

- `option` in the path is one of:
  - `current`: the session of the token you call with.
  - `other`: every session except the current one.
  - `all`: every session, including the current one.
  - a session ID (UUID) from `GET /auth/session`: that one session.
- Ovok rejects the access tokens of the revoked sessions on their next request, and marks each Login as revoked in Medplum so the session cannot be renewed.
- Revoking `current` or `all` also ends the token you called with.
- The response echoes the revoked sessions with `revoked: true`: one object for `current` or a session ID, a list for `other` and `all`.
- To end only the token you hold, without the session, use `POST /v1/auth/logout`.

## Example

```bash
curl -X DELETE 'https://api.sandbox.ovok.com/auth/session/other' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'
```
