Custom field not added


I'm using the v3.1 API to add subscriber to a specific list using cUrl and PHP, now the user is added but the custom fields I'm adding to the request not.

I've formatted the request as in the documentation, I've created the custom fields in the list and I'm sending the fields like (example):


The user is added successfully, however when I go on the user details the custom fields are empty.

Am I missing something?

Thanks for any help

Mercer, 1 year ago

Hey there M4tt3,

This is a great question! Would you mind me asking if you are currently using our PHP Wrapper for our API? If not, I might recommend doing so, and then taking a look at our add.php example from our documentation. It looks like your request might be formatted a bit differently from the examples on our site, so I might recommend taking a look at the above and seeing if that helps. :]


M4tt3, 1 year ago

Hello  Mercer,

thanks for your reply, I'm not currently using the PHP wrapper I'm using a simple cUrl call to be faster, but I'll switch to the wrapper and hopefully it'll solve the problem


M4tt3, 1 year ago

Hello again,

I've switched to the PHP wrapper but the result was the same but, thanks to your link I found the problem:

the structure should be

            'Key' => 'Field 1 Key',
            'Value' => 'Field Value'

and I was using a simple Key => value array

Now it works like a charm

Thanks mate

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