Logout user
POST
/logout
const url = 'https://example.com/api/v1/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/logoutRevoke the session token and clear the session cookie
Responses
Section titled “ Responses ”Logged out
Media typeapplication/json
object
message
string
Examplegenerated
{ "message": "example"}