# Revoke session tokens

> Source: https://truto.one/docs/api-reference/admin/session-tokens/revoke/

`DELETE /session-token`

Resource: **Session tokens**

## Request body

- **`tenant_id`** _(string)_
  The tenant whose sessions should be revoked.
- **`environment_id`** _(string)_
  The environment to revoke in. Required for user-session auth. Defaults to the API token's own environment for API-token auth.

## Response body

- **`revoked_count`** _(integer)_
  How many live sessions were revoked. Zero when the tenant had none.

## Code examples

### curl

```bash
curl -X DELETE 'https://api.truto.one/session-token' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
const response = await fetch('https://api.truto.one/session-token', {
  method: 'DELETE',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

url = "https://api.truto.one/session-token"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}

response = requests.delete(url, headers=headers, params=params)
print(response.json())
```
