---
title: "Sign out this browser (and end its WorkOS session)"
description: "Revokes the session in the cookie, clears the cookie, and sends the browser to WorkOS's logout URL, which returns to `/`. Needs `Origin` equal to Pando's own."
---

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

Path: Pando API › users

`POST /v1/logout`

Revokes the session in the cookie, clears the cookie, and sends the browser to WorkOS's logout URL, which returns to `/`. Needs `Origin` equal to Pando's own.

## Authentication

- `session`, apiKey, in cookie

## Code samples

### cURL

```curl
curl --request POST \
  --url https://app.gitpando.com/v1/logout \
  --header '__Host-pando_session: <value>'
```

### TypeScript

```typescript
const url = 'https://app.gitpando.com/v1/logout';
const options = {method: 'POST', headers: {'__Host-pando_session': '<value>'}};

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

### Python

```python
import requests

url = "https://app.gitpando.com/v1/logout"

headers = {"__Host-pando_session": "<value>"}

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

print(response.text)
```

## Responses

### 200

With `Accept: application/json`.

#### Example

```json
{
  "signed_out": true,
  "logout_url": "string"
}
```

- `logout.response.200.signed_out` (boolean, optional)
- `logout.response.200.logout_url` (string, optional) — Open this to end the WorkOS session too.

### 303

To WorkOS's logout URL (a form post).

### 403

An error

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "paths": [
      "string"
    ],
    "checks": {
      "sha": "string",
      "state": "success",
      "required": [
        "string"
      ],
      "checks_unknown": "string",
      "missing": [
        "string"
      ],
      "statuses": [
        {
          "sha": "string",
          "context": "string",
          "state": "pending",
          "target_url": "string",
          "description": "string",
          "creator": "string",
          "app": "string",
          "created_at": "2019-08-24T14:15:22Z"
        }
      ]
    }
  }
}
```

- `logout.response.403.error` (object, required)
  - `logout.response.403.error.code` (string, required)
  - `logout.response.403.error.message` (string, required)
  - `logout.response.403.error.paths` (array<string>, optional)
  - `logout.response.403.error.checks` (object, optional) — GitHub's combined status, plus the required contexts and which are missing.
    - `logout.response.403.error.checks.sha` (string | null, required)
    - `logout.response.403.error.checks.state` (string, required) — `success` when the merge gate passes; `missing` when a required context has not reported; `unknown` while the required checks are (an unforced merge is refused).
      - one of `"success"`, `"pending"`, `"failure"`, `"error"`, `"missing"`, `"unknown"`
    - `logout.response.403.error.checks.required` (array | null, required) — Null while unknown.
    - `logout.response.403.error.checks.checks_unknown` (string | null, required) — Why the required checks are unknown, in plain words: "Pando couldn't read this monorepo's required checks; try again", or "pando.toml line 3: expected comma or end of structure; fix it on main, or merge with force". Null otherwise.
    - `logout.response.403.error.checks.statuses` (array<object>, required) — The latest status per context.
      - `logout.response.403.error.checks.statuses.sha` (string, required)
      - `logout.response.403.error.checks.statuses.context` (string, required)
      - `logout.response.403.error.checks.statuses.state` (string, required)
        - one of `"pending"`, `"success"`, `"failure"`, `"error"`
      - `logout.response.403.error.checks.statuses.created_at` (string, required)
        - format `date-time`
      - `logout.response.403.error.checks.statuses.target_url` (string | null, optional)
      - `logout.response.403.error.checks.statuses.description` (string | null, optional)
      - `logout.response.403.error.checks.statuses.creator` (string, optional) — The member who posted it (a login); `app:<slug>` for a status posted with a status token or by a CI integration; `hook:<hook id>` for a status token from a web hook with no app.
      - `logout.response.403.error.checks.statuses.app` (string | null, optional) — The CI service that reported it (`buildkite`, `github-actions`, ...), stamped by Pando from a status token or a CI integration, never from the body or `target_url`. Null when a member posted it with their own credential. The web shows the service's mark for a slug it knows.
    - `logout.response.403.error.checks.missing` (array<string>, optional)


Source: https://docs.gitpando.com/api/users/logout/index.md
