Skip to main content
POST
/
api
/
v2
/
auth
/
logout
Logout
curl --request POST \
  --url https://api.example.com/api/v2/auth/logout \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "refresh_token": "<string>"
}
'
Authorization
string
required
Authorization: Bearer nb_YOUR_ACCESS_TOKEN
refresh_token
string
Refresh token to revoke. If omitted, the token from the Authorization header is used.

Request

curl -X POST https://neuralbox.top/api/v2/auth/logout \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response

{ "message": "Logged out successfully" }
After logout, the refresh token is invalidated. The access token remains valid until it expires (max 15 minutes).