POST /api/userAuth/logout
Invalidates the current refresh session. After calling this endpoint, the refresh token can no longer be used to obtain new access tokens. Any subsequent requests using the old access token will fail once it expires.
Required Header
x-api-key: your pk_live_… key.
Sending the Refresh Token
Like the refresh endpoint, logout needs to read the current refresh token to know which session to revoke.- Web (browser): include
credentials: 'include'— the browser sends the HTTP-only cookie automatically. - Mobile / non-browser: include the
x-refresh-tokenheader with the stored refresh token.
Response Fields
true when the session was revoked.Human-readable confirmation message.
Code Examples
Success Response
Errors
| Status | Cause |
|---|---|
401 Unauthorized | Refresh token missing or already invalidated |
