Clear the session cookie
POST
/auth/logout
const url = 'https://your-server.example/api/auth/logout';const options = {method: 'POST', headers: {cookie: 'session=<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://your-server.example/api/auth/logout \ --cookie session=<session>Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Cookie cleared.
Media typeapplication/json
object
status
string
Example
{ "status": "ok"}