---
title: "logout"
---

> Documentation Index
> Fetch the complete documentation index at: https://agenthold.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# logout

Path: agenthold API › auth-flow

`POST /auth/logout`

URL: `/api/v1/auth/logout`

## Authentication

Requires one of the following:

- `session`, apiKey, in cookie
- `token`, http bearer, header `Authorization`

## Code samples

### cURL

```bash
curl --request POST \
  --url '<base-url>/api/v1/auth/logout' \
  --cookie 'agenthold_session=<agenthold_session>'
```

### TypeScript

```typescript
const url = '<base-url>/api/v1/auth/logout';
const options = {
  method: 'POST',
  headers: {cookie: 'agenthold_session=<agenthold_session>'}
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "<base-url>/api/v1/auth/logout"

headers = {"cookie": "agenthold_session=<agenthold_session>"}

response = requests.post(url, headers=headers)

print(response.text)
```

## Responses

### 204

Session ended.


Source: https://agenthold.dev/api/logout/index.md
