How to update a custom field?

Hi,

I want to manage the custom fields through the API, I have already done add and remove functionality but I haven't found a way to update the custom fields details (name and options).

Is there a function to do that?
Thanks in advance.

Dave Dave, 7 years ago

Hey Sylvain, you can do this using the Subscirber.AddWithCustomFields method. if the subscriber already exists (based on their email address), and new custom fields information will be used to update their record.

More details on the method here:
http://www.campaignmonitor.com/api/method/subscriber-addwithcustomfields/

Sylvain, 7 years ago

Hey Dave,

Thanks for your answer, but that's not what I'm looking for. It looks like I didn't explain properly what I want to do.

Actually, I don't want to set the customer's custom fields values. I would like to update the custom fields of the list.

For example, my list has a custom field call "Favourite sports", which is a MultiSelectMany. The options of this field are “Soccer", “Surf", and “Base Ball".

I want to add another option to this field: “Ice skating". Can I do this through the API?

Thanks in advance.

Mathew Mathew, 7 years ago

Hi Sylvain,

At the moment, it isn't actually possible to add a new possible option to a multiple option field, via the API. You'd either need to login through the app and add that field, or get the existing data for everyone, remove the old field, add the new one, and re update.


Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor
Sylvain, 7 years ago

Ok, that's what I thought.
Thank you Mathew for your answer.

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