Skip to main content

Check if user already exists

GET/api/v1/check-user

Checks whether a user exists in the system by email or phone number. Returns the user's creation date and whether they belong to the current organization.

cv-api-key
Productionhttps://api.care360-next.carevalidate.com/api/v1/check-user
Staginghttps://api-staging.care360-next.carevalidate.com/api/v1/check-user
note

Either email or phone number must be provided. If both are provided, email takes priority. Special characters in email and phone-number must be url-encoded. For example, pass %2b instead of + in the phone number.

Headers

Headers
cv-api-keystringrequired

Your unique API key for authentication.

Query Parameters

Query Parameters
emailstringoptional

The user's email address. Required if phone-number is not provided.

Example: john@example.com
phone-numberstringoptional

The user's phone number. Required if email is not provided.

Example: %2b11111111111
note

You must provide at least one of the query parameters (email or phone-number). If both are provided, email takes priority.

note

The existsInCurrentOrganization field will be true if the user belongs to the organization associated with the cv-api-key, and false otherwise.

Example Request

curl --location '<BASE_URL>/api/v1/check-user?email=john@example.com&phone-number=%2b11111111111' \
--header 'cv-api-key: <redacted>'

Responses

200User found by emailReturned if a user is found with the provided email.
{
"status": 200,
"success": true,
"message": "Email already exists",
"data": {
"createdAt": "2024-09-04T12:00:00.000Z",
"existsInCurrentOrganization": true,
"code": "EMAIL_EXISTS"
}
}
200User found by phone numberReturned if a user is found with the provided phone-number.
{
"status": 200,
"success": true,
"message": "Phone number already exists",
"data": {
"createdAt": "2024-09-04T12:00:00.000Z",
"existsInCurrentOrganization": false,
"code": "PHONE_NUMBER_EXISTS"
}
}
200User not foundReturned if the user does not exist in the system.
{
"status": 200,
"success": false,
"message": "User does not exist",
"data": {
"code": "USER_NOT_FOUND"
}
}
400Missing parametersReturned if both email and phone-number query parameters are missing.
{
"status": 400,
"success": false,
"message": "Email or phone number is required."
}
401Invalid API keyReturned if the cv-api-key is missing or invalid.
{
"status": 401,
"error": "Invalid request"
}

Try It Out