Sets a contact's value for one custom field. This operation is an upsert: when the contact has no value for the field yet, a new fieldValue is created and returned with 201; when a value already exists, that existing record is updated and returned with 200 with its original id, so a contact-and-field pair never produces two records. Multi-select fields (checkbox, listbox) store their selections as ||option 1||option 2||, wrapped and separated by double pipes. Date and datetime values are best sent in ISO 8601 (YYYY-MM-DD for dates); other formats are also read, as described on value. 422 if the field id is missing or does not exist, 404 if the contact does not exist, 400 if the body is not a JSON object. 403 without contact-edit permission, or, for a user outside the Admin group calling the API directly, when the field is not on any of the user's lists. The response side-loads the updated contact in a contacts array. The preferred language field comes back as its stored code here, not the language name the reads return.
Datetime field values will be converted to your account's timezone when savedExample: If an account has a timezone setting of Central (America/Chicago):
- Sending a datetime w/ timezone of
2024-11-01T13:05:00-06:00will be saved in the account's preference of Chicago's (Central) timezone:2024-11-01T14:05:00-05:00
Example POST Body
POST Body{
"fieldValue": {
"contact": 2,
"field": 3,
"value": "Blue"
},
"useDefaults": true
}{
"fieldValue": {
"contact": 2,
"field": 4,
"value": "Option 1"
}
}{
"fieldValue": {
"contact": 2,
"field": 7,
"value": "2018-12-31"
}
}{
"fieldValue": {
"contact": 2,
"field": 7,
"value": "2020-05-19T02:45:00-05:00"
}
}{
"fieldValue": {
"contact": 2,
"field": 6,
"value": "||Option 1||Option 3||Option 4||"
}
}{
"fieldValue": {
"contact": 2,
"field": 6,
"value": "||Option 2||"
}
}