End the browser session
const url = 'https://example.com/v1/auth/logout';const options = {method: 'POST', headers: {cookie: 'affectra_session=<affectra_session>'}};
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/v1/auth/logout \ --cookie affectra_session=<affectra_session>Ends the Affectra session. If sign-in went through an identity provider that supports logout, the response names its logout URL; the browser must go there too, or the provider signs the user straight back in.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Signed out of Affectra; continue at the provider
object
Example generated
{ "redirect": "example"}Signed out
No session
Missing X-Affectra-CSRF header
Over the operation’s rate-limit budget (x-affectra-budget): code request.rateLimited with params.budget. Wait Retry-After seconds before trying again.
Every error answer, Content-Type
application/problem+json. The web app and integrations translate code; detail is English,
for people reading curl output or CI logs, and may change wording at
any time. Match on code, never on detail.
object
The HTTP status
Stable error codes. A code is never renamed; new ones may be added, so
a client falls back to detail for a code it doesn’t know. Another
organization’s object answers notFound, the same as a missing one.
What went wrong
Values the code’s message needs, e.g. {“field”: “version”}. Only values the caller sent or may see. Empty when the message needs none.
object
Example
{ "code": "notFound"}Headers
Section titled “Headers”Seconds until a request would be allowed again, at least 1