How to uncheck a SELECT MANY custom field value

I could set a option in a SELECT MANY custom field anytime through API.  But, is there a way to uncheck a option from a SELECT MANY custom field through the API?

jamesm, 5 years ago

Hi rajithe,

To uncheck a select-many custom field via the v3 API, use the Add Subscriber method and send a POST to /subscribers/{list_id}.

Make sure to only include the custom field values that you want to keep selected; all others will be deselected. For example, if I had a custom field named colors, and a subscriber had selected red, green and blue, if I want to deselect blue, then my JSON request would look like this:


{
  "EmailAddress" : "user@example.com", 
  "Name" : "Example User",
  "CustomFields" : [
    {
      "Key" : "[colors]",
      "Value" : "red"
    },
    {
      "Key" : "[colors]",
      "Value" : "green"
    }
  ],
  "Resubscribe" : false
}

Hope this helps.

rajithe, 5 years ago

Thank you so much for the response. But how could I uncheck all the options? I tried sending EMPTY and NULL values. But that doesn't work.

Also, Is there a way to uncheck a value in a SELECT ONE option field through API? What I want is to clear out the currently selected option in a SELECT ONE field. I can do this through web interface. But can I do this through API?

jamesm, 5 years ago
rajithe :

Thank you so much for the response. But how could I uncheck all the options? I tried sending EMPTY and NULL values. But that doesn't work.

Also, Is there a way to uncheck a value in a SELECT ONE option field through API? What I want is to clear out the currently selected option in a SELECT ONE field. I can do this through web interface. But can I do this through API?

Hi rajithe,

It looks like you've uncovered a couple of inconsistencies in the API. We're taking a look at both of these issues now and aim to release a fix soon.

We want to make deselecting and clearing Custom Fields as consistent as possible across all field types.

Apologies for the inconvenience. We'll update this thread when the fix has been released and is ready for you to use.

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free
1-888-533-8098