# DELETE /api/auth/sessions/:id

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

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

Erneuere eine aktive Sitzung, die dem authentifizierten Konto gehört.

Status: Bearer oder API-Schlüssel · destruktiv · JSON

## HTTP-Anfrage {#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()
```

## Pfadparameter {#path}

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `id` | string | erforderlich | Die Sitzungskennung, die vom Endpunkt der Listensitzungen zurückgegeben wird. |

## Erfolgreiche Antwort {#response}

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

## Fehler {#errors}

| Code | Status | Bedeutung |
| --- | --- | --- |
| session_not_found | 404 | Zu diesem Konto gehört keine Sitzung mit diesem Identifier. |
