# Sign the dashboard out.

> Ends the passphrase session and clears its cookie.
> https://koi.dog/docs/api/session/logout-session/

`POST /api/v1/session/logout` · Key: `session only`

With Clerk it changes nothing and answers `ok`: Clerk's browser code signs out. To call it outside the dashboard, send the dashboard's `koidog_session` cookie and `Origin: https://app.koi.dog`. No path or query parameters, and no body.

## Headers.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | `string` | no | Makes a retry safe: the same key with the same request returns the first answer and does nothing else. |

## Response.

200 OK: a JSON object. The example has placeholder values.

## Request.

```sh
# The dashboard session only: an API key is refused (403 session_required).
curl -X POST https://app.koi.dog/api/v1/session/logout \
    -H "Cookie: koidog_session=$KOIDOG_SESSION" \
    -H "Origin: https://app.koi.dog" \
    -H "Idempotency-Key: $(uuidgen)"
```

```js
// The dashboard session only: an API key is refused (403 session_required).
const res = await fetch("https://app.koi.dog/api/v1/session/logout", {
  method: "POST",
  headers: {
    Cookie: `koidog_session=${process.env.KOIDOG_SESSION}`,
    Origin: "https://app.koi.dog",
    "Idempotency-Key": crypto.randomUUID(),
  },
});
console.log(await res.json());
```

```python
import os
import uuid

import requests

# The dashboard session only: an API key is refused (403 session_required).
r = requests.post(
    "https://app.koi.dog/api/v1/session/logout",
    headers={
        "Cookie": f"koidog_session={os.environ['KOIDOG_SESSION']}",
        "Origin": "https://app.koi.dog",
        "Idempotency-Key": str(uuid.uuid4()),
    },
)
r.raise_for_status()
print(r.json())
```

## Response example.

```json
{
  "ok": true
}
```
