Update user profile
/api/v1/usersUpdates the profile information for an existing user.
https://api.care360-next.carevalidate.com/api/v1/usershttps://api-staging.care360-next.carevalidate.com/api/v1/usersUsers can freely update their profile information until a case has been assigned to a provider. Once a case is assigned, the following fields are locked: firstName, lastName, dob, and gender. This is a security measure because ID verification is performed before a case is assigned to a provider. If a user needs to update any of these locked fields, they must contact the support team for a manual update.
Headers
cv-api-keystringrequiredYour unique API key for authentication.
Content-TypestringrequiredMust be application/json.
application/jsonRequest Body
actionstringrequiredThe action to be performed. Must be UPDATE_PROFILE.
dataobjectrequiredAn object containing the user's profile details to be updated.
Show 16 child properties
emailstringrequiredThe user's email address.
john.doe@example.comfirstNamestringoptionalThe user's first name.
JohnlastNamestringoptionalThe user's last name.
DoedobstringoptionalThe user's date of birth in YYYY-MM-DD format.
1995-10-01genderstringoptionalThe user's gender.
phoneNumberstringoptionalThe user's phone number.
+11111111111addressstringoptionalThe user's street address. It should not be a PO Box Address.
123 ABC streetaddress2stringoptionalOptional second line for the address (e.g., apartment or suite number). Send null to reset.
Apt 2citystringoptionalThe user's city.
NYCstatestringoptionalThe user's state in 2-character abbreviation format.
NYcountrystringoptionalThe user's country code in 2-character abbreviation format.
USpostalCodestringoptionalThe user's postal code (e.g., 12345 or 12345-6789).
01010allergiesstringoptionalThe user's allergies.
Peanuts, ShellfishcurrentMedicationsstringoptionalThe user's current medications.
Aspirin, MetforminhealthConditionsstringoptionalThe user's health conditions.
Diabetes, HypertensionlanguagePreferencesarrayoptionalThe user's language preferences.
["en", "es", "fr"]Example Request
- cURL
- JavaScript
- Python
curl --location '<BASE_URL>/api/v1/users' \
--header 'cv-api-key: <redacted>' \
--header 'Content-Type: application/json' \
--data-raw '{
"action": "UPDATE_PROFILE",
"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"]
}
}'
const response = await fetch('<BASE_URL>/api/v1/users', {
method: 'POST',
headers: {
'cv-api-key': '<redacted>',
'Content-Type': 'application/json',
},
body: JSON.stringify({
action: 'UPDATE_PROFILE',
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'],
},
}),
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
'<BASE_URL>/api/v1/users',
headers={
'cv-api-key': '<redacted>',
'Content-Type': 'application/json',
},
json={
'action': 'UPDATE_PROFILE',
'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'],
},
},
)
print(response.json())
Responses
▶200Profile updated successfullyThe profile was updated successfully. Returns the updated user object.
{
"status": 200,
"success": true,
"message": "Profile updated successfully",
"data": {
"user": {
"email": "john@example.com",
"firstName": "John",
"lastName": "Doe",
"dob": "1995-10-01T00:00:00.000Z",
"phoneNumber": "+15513446634",
"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"
]
}
}
}
▶400User does not existThe email provided does not correspond to an existing user.
{
"status": 400,
"success": false,
"message": "User {email} does not exist"
}
▶400User not in organizationThe user exists but is not part of the organization associated with the API key.
{
"status": 400,
"success": false,
"message": "User {email} does not exist in the organization"
}
▶400Not allowed to update profileThe user's role is not USER, so they cannot update their profile.
{
"status": 400,
"success": false,
"message": "Not allowed to update the profile"
}
▶400Cannot update demographic fieldsThe user has cases with status Approved, Assigned, InProgress, NoDecision, or Rejected. Fields firstName, lastName, dob, and gender are locked.
{
"status": 400,
"success": false,
"message": "Cannot update user profile fields (firstName, lastName, dob, gender) for user with cases"
}
▶400Phone number already in useThe new phoneNumber is already associated with a different user.
{
"status": 400,
"success": false,
"message": "Unable to use this phone number. Please use a different one"
}