# DELETE /api/auth/sessions/:id

Canonical URL: https://developers.iagenify.com/api/auth/revoke-session/
Language: en

`DELETE https://api.iagenify.com/api/auth/sessions/:id`

Revoke one active session owned by the authenticated account.

Status: Bearer or API key · destructive · JSON

## HTTP request {#http}

```bash
curl https://api.iagenify.com/api/auth/sessions/SESSION_ID \
  -X DELETE \
  -H "Authorization: Bearer $IAGENIFY_TOKEN"
```

## JavaScript {#javascript}

```javascript
const response = await fetch("https://api.iagenify.com/api/auth/sessions/SESSION_ID", {
  method: "DELETE",
  headers: { Authorization: `Bearer ${process.env.IAGENIFY_TOKEN}` },
});
const result = await response.json();
if (!response.ok) throw new Error(result.error);
```

## Python {#python}

```python
import os, requests

response = requests.request(
    "DELETE",
    "https://api.iagenify.com/api/auth/sessions/SESSION_ID",
    headers={"Authorization": "Bearer " + os.environ["IAGENIFY_TOKEN"]},
    timeout=30,
)
response.raise_for_status()
result = response.json()
```

## Path parameter {#path}

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `id` | string | required | The session identifier returned by the list-sessions endpoint. |

## Successful response {#response}

```javascript
{ ok: true }
```

## Errors {#errors}

| Code | Status | Meaning |
| --- | --- | --- |
| session_not_found | 404 | No session with that identifier belongs to this account. |
