Search users by email
/api/v1/usersGets a paginated list of users within the organization. Results are sorted by `createdAt` by default and can be optionally filtered by email using a prefix match (e.g. 'john' matches 'john.doe@example.com').
https://api.care360-next.carevalidate.com/api/v1/usershttps://api-staging.care360-next.carevalidate.com/api/v1/usersHeaders
cv-api-keystringrequiredYour unique API key for authentication.
Query Parameters
emailstringoptionalOptional email prefix filter. When provided, results are filtered using startsWith against user email.
johnsorOrderstringoptionalOptional sort direction. Accepts `asc` or `desc`. Defaults to `asc`.
ascsortBystringoptionalOptional sort field. Currently only `createdAt` is supported and used as the default.
createdAtlimitnumberoptionalNumber of results per page. Defaults to 10 when omitted.
10afterstringoptionalCursor for fetching the next page.
MjAyNS0xMS0yNlQxMDo1NToxMi4wMTRafG45SHRoNTFRcHBlUnpoMVk2TVBOVlZwdU1zYzIIf email is omitted, the API returns users for the organization sorted by createdAt.
If email is provided, it is applied as an additional startsWith filter on email.
sortBy is optional and currently supports only createdAt. sortOrder is optional and controls ascending or descending order.
Use after from meta.cursor to fetch the next page.
Example Request
- cURL
- JavaScript
- Python
curl --location '<BASE_URL>/api/v1/users?limit=10&after=<cursor>' \
--header 'cv-api-key: <redacted>'
const response = await fetch(
'<BASE_URL>/api/v1/users?limit=10&after=<cursor>',
{
method: 'GET',
headers: {
'cv-api-key': '<redacted>',
},
}
);
const data = await response.json();
console.log(data);
import requests
response = requests.get(
'<BASE_URL>/api/v1/users',
headers={
'cv-api-key': '<redacted>',
},
params={
'limit': 10,
'after': '<cursor>',
# Optional:
# 'email': 'john',
},
)
print(response.json())
Responses
▶200Users fetchedReturned when users are successfully fetched.
{
"meta": {
"hasMore": true,
"cursor": "<cursor>"
},
"data": [
{
"email": "john.doe@example.com",
"firstName": "John",
"lastName": "Doe",
"dob": "1995-10-01",
"phoneNumber": "+11111111111",
"gender": "MALE",
"address": "123 ABC street",
"address2": "Apt 2",
"city": "NYC",
"state": "NY",
"country": "US",
"postalCode": "01010",
"allergies": "Peanuts, Shellfish",
"currentMedications": "Aspirin, Metformin",
"healthConditions": "Diabetes, Hypertension",
"languagePreferences": [
"en",
"es",
"fr"
],
"communicationPreferences": {
"smsNotificationsDisabled": true,
"notificationsDisabled": true
}
}
]
}
▶401Invalid API keyReturned if the cv-api-key is missing or invalid.
{
"status": 401,
"error": "Invalid request"
}