Discussions

Ask a Question
Back to all

Set multiple options on a select - allow multiple - contact custom attribute via the api

Hello, I have a contact custom attribute with a field type of Select, and allow multiple Yes. And I can't figure out how I can select multiple options for the field via the api.

Is this possible?

For example, if I had the contact custom attribute:

Multiple Select Test

with options: Option 1, Option 2, Option 3, Option 4

and I wanted to select Option 1, Option 2 and Option 4

I was trying to use Update Contact like this:

{
"contact": {
"custom_attributes": {
"multi_select_test": ["Option 1", "Option 2", "Option 4"]
}
}
}

And I get a 500 error "error": "Unexpected error: The API team has been notified"

If the custom attribute does not exist before doing the call above, the call succeeds, but it creates a contact custom attribute with the field type Text.

Thanks!