Set a contact custom field value

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 accepted and returned in ISO 8601. 422 if the field id does not exist, 404 if the contact does not exist, 403 without contact-edit permission. With useDefaults=true, any other required fields the contact is missing are filled with their default values. The response side-loads the updated contact in a contacts array.

🚧

Datetime field values will be converted to your account's timezone when saved

Example: If an account has a timezone setting of Central (America/Chicago):

  • Sending a datetime w/ timezone of 2024-11-01T13:05:00-06:00 will be saved in the account's preference of Chicago's (Central) timezone: 2024-11-01T14:05:00-05:00

Example 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||"
    }
}
Body Params
fieldValue
object
boolean
Defaults to false

If true, this will populate the missing required fields for this contact with default values

Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Choose an example:
application/json