---
title: "Logout by removing current session"
method: POST
path: "/zot/auth/logout"
---

# Logout by removing current session

`POST /zot/auth/logout`

## Request

- The document declares no server URL.
- Auth: none declared
- TypeScript: <https://skmtc.dev/project-zot/apis/open-container-initiative-distribution-specification/docs/zot/auth/logout/post.ts> (a function with typed inputs; its response is checked against the schema)

Logout by removing current session. For OIDC providers that advertise an
`end_session_endpoint` in their discovery metadata (OpenID Connect
RP-Initiated Logout 1.0), the response body contains an `endSessionUrl`
the client should navigate to in order to terminate the session at the IdP.

## Response `200`

OK

- ApiLogoutResponse
  - `endSessionUrl` string

## Other responses

- `500`: internal server error

## Changes

- **2023-10-20** `c56ae3fa3f7d`: 1 info
  - endpoint added
- **2021-10-21** `81b68c5e4fde`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/project-zot/apis/open-container-initiative-distribution-specification/changes/zot/auth/logout/post.md)

---

[API](https://skmtc.dev/project-zot/apis/open-container-initiative-distribution-specification.md) - [All operations](https://skmtc.dev/project-zot/apis/open-container-initiative-distribution-specification/llms.txt) - [OpenAPI document](https://skmtc.dev/project-zot/apis/open-container-initiative-distribution-specification/revisions/7937343ee83f?raw)
