Revoke the caller's bearer token so it cannot be reused.
POST
/api/v1/auth/logout
const url = 'https://example.com/api/v1/auth/logout';const options = {method: 'POST'};
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://example.com/api/v1/auth/logoutIdempotent and unguarded: an absent, expired or already-revoked token still answers 204. Making logout require a valid session would mean the one action that fixes a suspect token is refused precisely when the token has gone bad.
Authorizations
Section titled “Authorizations”- None
Responses
Section titled “Responses”Token revoked; an absent, expired or already-revoked token answers 204 too