Skip to content
memghost.com Open App

Revoke session and logout user

POST
/auth/logout

Revokes the current session, invalidating both access and refresh tokens. This is a command that returns 202 Accepted.

Logout command accepted

Location
string

URL to the session resource

Unauthorized (authentication required or invalid token)

object
error
required

Error code

string
Allowed values: validation_error not_found version_conflict internal_error invalid_request unauthorized rate_limit_exceeded
Example
unauthorized
message
required

Human-readable error message

string
Example
Invalid username or password
details

Additional error details (field-level validation errors, etc.)

object
key
additional properties
any
Examples
{
"error": "unauthorized",
"message": "Authentication required"
}

Internal server error

object
error
required

Error code

string
Allowed values: validation_error not_found version_conflict internal_error invalid_request unauthorized rate_limit_exceeded
Example
unauthorized
message
required

Human-readable error message

string
Example
Invalid username or password
details

Additional error details (field-level validation errors, etc.)

object
key
additional properties
any
Examples
{
"error": "internal_error",
"message": "An internal error occurred"
}