---
title: "Update Logout Flow"
method: GET
path: "/self-service/logout"
tags: ["frontend"]
---

# Update Logout Flow

`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 303 See Other)
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
- `return_to` string

## Headers

- `Cookie` string

## Response `204`

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

## Other responses

- `303` — Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 204.
- `default` — errorGeneric

## Changes

> 47 revisions in range; 1 could not be searched.

- **2023-08-31** `d10e7b267596` — 1 info
  - added the new optional `header` request parameter `Cookie`
- **2022-12-02** `b6e5ffa30d4c` — 4 info
  - api operation id `submitSelfServiceLogoutFlow` removed and replaced with `updateLogoutFlow`
  - api tag `frontend` added
  - api tag `v0alpha2` removed
  - removed the non-success response with the status `500`
- **2022-03-22** `028a4cf83c15` — 2 info
  - added the non-success response with the status `303`
  - removed the non-success response with the status `302`
- **2021-10-28** `c55ed8ad9f0c` — 4 info
  - api tag `v0alpha2` added
  - api tag `v0alpha1` removed
  - added the new optional `query` request parameter `return_to`
  - added the optional property `error/id` to the response with the `500` status
- **2021-07-13** `8f1b399ab6e6` — 1 info
  - endpoint added

[Full 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/7a0df90e2f13/schema)
