cURL
curl --request POST \ --url https://api.bunship.com/api/v1/auth/logout \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "allSessions": true } '
{ "message": "Logged out successfully" }
Revoke the current session or all sessions
allSessions
true
false
401
AUTHENTICATION_ERROR
curl -X POST https://api.bunship.com/api/v1/auth/logout \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \ -H "Content-Type: application/json" \ -d '{"allSessions": false}'
curl -X POST https://api.bunship.com/api/v1/auth/logout \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \ -H "Content-Type: application/json" \ -d '{"allSessions": true}'