---
title: "Complete Self-Service Logout"
method: GET
path: "/self-service/logout"
tags: ["v0alpha1"]
---

# Complete Self-Service Logout

`GET /self-service/logout`

This endpoint logs out an identity in a self-service manner.

If the `Accept` HTTP header is not set to `application/json`, the browser will be redirected (HTTP 302 Found)
to the `return_to` parameter of the initial request or fall back to `urls.default_return_to`.

If the `Accept` HTTP header is set to `application/json`, a 204 No Content response
will be sent on successful logout instead.

This endpoint is NOT INTENDED for API clients and only works
with browsers (Chrome, Firefox, ...). For API clients you can
call the `/self-service/logout/api` URL directly with the Ory Session Token.

More information can be found at [Ory Kratos User Logout Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-logout).

## Query parameters

- `token` string

## Response `204`

Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201.

## Other responses

- `302` — Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201.
- `500` — jsonError

## Changes

- **2021-07-13** `8f1b399ab6e6` — 1 info
  - endpoint added
- **2021-05-05** `381c760af46e` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/ory/apis/ory-identities-api/changes/self-service/logout/get.md)

---

[API](https://skmtc.dev/ory/apis/ory-identities-api.md) · [All operations](https://skmtc.dev/ory/apis/ory-identities-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ory/ory-identities-api/revisions/071bec03ddcd/schema)
