Logout
POST
/api/v1/users/auth/logoutRevokes the entire refresh-token family that the supplied refresh token belongs to. All currently-active sibling tokens within that family are simultaneously revoked.
cv-api-key + refresh_token (body)
Production
https://api.care360-next.carevalidate.com/api/v1/users/auth/logoutStaging
https://api-staging.care360-next.carevalidate.com/api/v1/users/auth/logoutnote
This endpoint always returns 200 OK when authenticated against a valid organization, even if the supplied refresh token is unknown or already revoked. It does not leak whether the token was valid.
Headers
Headers
cv-api-keystringrequiredYour unique API key for authentication.
Content-TypestringrequiredMust be application/json.
Request Body
Body
refresh_tokenstringrequiredThe opaque refresh token whose family should be revoked.
Behavior
- Resolves the organization from
cv-api-key. - SHA3-512-hashes the supplied refresh token and looks up the row.
- If found, revokes the entire family by
familyId— every active sibling token is invalidated in one operation. - If not found, returns success silently.
Example Request
- cURL
- JavaScript
- Python
curl -X POST '<BASE_URL>/api/v1/users/auth/logout' \
-H 'cv-api-key: <redacted>' \
-H 'Content-Type: application/json' \
-d '{
"refresh_token": "<opaque-refresh-token>"
}'
const response = await fetch(
'<BASE_URL>/api/v1/users/auth/logout',
{
method: 'POST',
headers: {
'cv-api-key': '<redacted>',
'Content-Type': 'application/json',
},
body: JSON.stringify({
refresh_token: '<opaque-refresh-token>',
}),
}
);
const data = await response.json();
console.log(data);
import requests
response = requests.post(
'<BASE_URL>/api/v1/users/auth/logout',
headers={
'cv-api-key': '<redacted>',
'Content-Type': 'application/json',
},
json={
'refresh_token': '<opaque-refresh-token>',
},
)
print(response.json())
Responses
▶200SuccessFamily revoked, or token unknown (returned identically to avoid leaking validity).
{
"status": 200,
"success": true
}
▶400Validation errorcv-api-key missing or body fails Zod (refresh_token empty).
{
"status": 400,
"success": false,
"error": "Validation failed",
"code": "VALIDATION_ERROR"
}
▶404Organization not foundcv-api-key does not resolve to a partner organization.
{
"status": 404,
"success": false,
"error": "Organization not found",
"code": "NOT_FOUND"
}
Try It Out
Try itAPI Playground
▶