Revoke the session behind a refresh token.
POST
/logout
const url = 'https://session-api.sudomimus.com/logout';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"refreshToken":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://session-api.sudomimus.com/logout \ --header 'Content-Type: application/json' \ --data '{ "refreshToken": "example" }'Revokes the single session identified by the supplied refresh token.
Any genuine signed version whose sid, aud, jti, and
rotationVersion bind to that session may authorize the revocation;
accepting an older genuine version here does not make it refreshable.
No client-auth JWT is required. The operation is idempotent.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
refreshToken
required
Any genuine signed refresh-token version for the session to revoke.
string
Examplegenerated
{ "refreshToken": "example"}Responses
Section titled “Responses”Revocation outcome.
Media typeapplication/json
object
revoked
required
boolean
Examplegenerated
{ "revoked": true}default
Section titled “default”Error response.
Media typeapplication/json
Error response body. A missing, malformed, or structurally invalid JSON
request body returns InvalidBody. Documented status-only failures have
an empty response body.
object
reason
required
string
message
string
Examplegenerated
{ "reason": "example", "message": "example"}