Documentation Index

Fetch the complete documentation index at: https://learn.servitly.com/llms.txt

Use this file to discover all available pages before exploring further.

User logout

Prev Next
Post
/identity/users/me/logout

Invalidates the user session, ensuring a secure logout.
The refresh token obtained at login must be provided in the payload: once invalidated it can no longer be used to renew the JWT token, and the client must discard the tokens it holds.

It is a good practice to invoke this endpoint whenever the user explicitly signs out, so that the session is not left open until the natural expiration of the tokens.

Security
HTTP
Type bearer
Header parameters
X-Servitly-Tenant
stringRequired

The name of the tenant (e.g. acme).

Body parameters

The logout request body must provide the refresh token, which is obtained from the login response.

object

The payload message for logout requests.

refreshToken
string

The refresh token obtained during the user login.

Example{{refreshToken}}
Responses
200

Logout succeeded.

401

User not authenticated.

object
message
string

The error response.

ExampleUser not authenticated
500

Internal server error.

object
message
string

The error response.

ExampleInternal Server Error