End the current session.
POST
/api/auth/logout
const url = 'https://api.tradr.cloud/api/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://api.tradr.cloud/api/auth/logoutRevokes the session server-side and clears the session cookie. Idempotent: calling it without a session still returns 200, so a client can always reach a signed-out state.
Responses
Section titled “Responses”The session is ended.
Media typeapplication/json
object
success
boolean
Examplegenerated
{ "success": true}