---
title: Signout
description: End a user session by signing out.
url: https://docs.influxdata.com/influxdb/cloud/api/signout/
estimated_tokens: 751
product: InfluxDB Cloud (TSM)
version: cloud
publisher: InfluxData
canonical: https://docs.influxdata.com/influxdb/cloud/api/signout/
---

[Download InfluxDB Cloud (TSM) API Spec](/openapi/influxdb-cloud-v2-api.yml)

End a user session by signing out.

POST`/api/v2/signout`

### Expire a user session

Expires a user session specified by a session cookie.

Use this endpoint to expire a user session that was generated when the user
authenticated with the InfluxDB Developer Console (UI) or the `POST /api/v2/signin` endpoint.

For example, the `POST /api/v2/signout` endpoint represents the third step
in the following three-step process
to authenticate a user, retrieve the `user` resource, and then expire the session:

1. Send a request with the user’s [Basic authentication credentials](#section/Authentication/BasicAuthentication)to the `POST /api/v2/signin` endpoint to create a user session and
   generate a session cookie.
2. Send a request to the `GET /api/v2/me` endpoint, passing the stored session cookie
   from step 1 to retrieve user information.
3. Send a request to the `POST /api/v2/signout` endpoint, passing the stored session
   cookie to expire the session.

*See the complete example in request samples.*

InfluxDB stores user sessions in memory only.
If a user doesn’t sign out, then the user session automatically expires within ten minutes or
during a restart of the InfluxDB instance.

To learn more about cookies in HTTP requests, see[Mozilla Developer Network (MDN) Web Docs, HTTP cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies).

#### Related endpoints

* [Signin](#tag/Signin)

#### Parameters

##### Header parameters

`Zap-Trace-Span`string

OpenTracing span context

Example request[Ask AI about this](#)

```sh
curl --request POST \
  "https://us-east-1-1.aws.cloud2.influxdata.com/api/v2/signout" \
  --header "Authorization: Bearer INFLUX_TOKEN"
```

#### Responses

204Success. The session is expired.

401Unauthorized.

`code`requiredstring

code is the machine-readable error code.

Allowed:`internal error`, `not implemented`, `not found`, `conflict`, `invalid`, `unprocessable entity`, `empty value`, `unavailable`, `forbidden`, `too many requests`, `unauthorized`, `method not allowed`, `request too large`, `unsupported media type`

`err`string

Stack of errors that occurred during processing of the request. Useful for debugging.

`message`string

Human-readable message.

`op`string

Describes the logical code operation when the error occurred. Useful for debugging.

defaultThe session expiry is unsuccessful.

`code`requiredstring

code is the machine-readable error code.

Allowed:`internal error`, `not implemented`, `not found`, `conflict`, `invalid`, `unprocessable entity`, `empty value`, `unavailable`, `forbidden`, `too many requests`, `unauthorized`, `method not allowed`, `request too large`, `unsupported media type`

`err`string

Stack of errors that occurred during processing of the request. Useful for debugging.

`message`string

Human-readable message.

`op`string

Describes the logical code operation when the error occurred. Useful for debugging.
