Sign out
curl --request POST \
--url https://my.server.express/api/v1/auth/logout \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"refreshToken": "<string>",
"everywhere": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({refreshToken: '<string>', everywhere: true})
};
fetch('https://my.server.express/api/v1/auth/logout', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/auth/logout"
payload = {
"refreshToken": "<string>",
"everywhere": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"sessionsRevoked": 1
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Auth
Sign out
Revokes refresh tokens. The access JWT can’t be revoked and simply expires within 15 minutes. Send refreshToken to end just this device; send everywhere: true, or no refresh token at all, to end every session on the account. The body is optional — a missing or non-JSON body revokes everything. A revocation failure is logged but doesn’t fail the request. Writes a LOGOUT audit entry.
POST
/
v1
/
auth
/
logout
Sign out
curl --request POST \
--url https://my.server.express/api/v1/auth/logout \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"refreshToken": "<string>",
"everywhere": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({refreshToken: '<string>', everywhere: true})
};
fetch('https://my.server.express/api/v1/auth/logout', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/auth/logout"
payload = {
"refreshToken": "<string>",
"everywhere": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"sessionsRevoked": 1
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Authorizations
Session access token (JWT) from POST /v1/auth/login or /v1/auth/refresh. A session satisfies every API scope.
Body
application/json