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, 2 years 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, 2 years 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, 2 years 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

See why 200,000 companies worldwide love Campaign Monitor.

From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that boost the bottom line.

Get started for free