Delete user
DELETE
/api/v1/users/{userId}Deactivates a user account within the calling organization. Closes all user cases and, if the user belongs to only one organization, marks the user as deactivated.
cv-api-key
Production
https://api.care360-next.carevalidate.com/api/v1/users/{userId}Staging
https://api-staging.care360-next.carevalidate.com/api/v1/users/{userId}Headers
Headers
cv-api-keystringrequiredYour unique API key for authentication.
Path Parameters
Path Parameters
userIdstringrequiredThe unique ID of the user to deactivate.
Example:
01HXYZ1234567890note
To look up a user's ID by email, call GET /api/v1/cases. Each case in the response includes a submitter object with both id and email fields.
Behavior
Deactivates the user account and closes all their open cases in the calling organization with the reason "Account closed". No data is permanently deleted.
Example Request
- cURL
- JavaScript
- Python
curl --location --request DELETE '<BASE_URL>/api/v1/users/<userId>' \
--header 'cv-api-key: <redacted>'
const response = await fetch('<BASE_URL>/api/v1/users/<userId>', {
method: 'DELETE',
headers: {
'cv-api-key': '<redacted>',
},
});
const data = await response.json();
console.log(data);
import requests
response = requests.delete(
'<BASE_URL>/api/v1/users/<userId>',
headers={
'cv-api-key': '<redacted>',
},
)
print(response.json())
Responses
▶200User deactivatedThe operation completed successfully.
{
"status": 200,
"success": true,
"message": "User deleted successfully"
}
▶400Missing API keyThe cv-api-key header is absent or empty.
{
"status": 400,
"success": false,
"message": "Validation error"
}
▶404User not foundNo active user with the given ID exists in the organization associated with the API key.
{
"status": 404,
"success": false,
"message": "User not found"
}
Try It Out
Try itAPI Playground
▶