Ruby wrapper: adding subscriber w/ custom field

I am using the Ruby wrapper to add subscribers and have everything hooked up in my controller (and working) using:
@cm =
@cm.add_subscriber(list_id,, @user.full_name)

What I want to do is add a custom field to CM (already done) and send the company info when adding a new subscriber.  I can't find any documentation on adding a new subscriber with custom fields, but hope that it is possible.  I tried a few random shots like add_subscriber(list_id,, @user.full_name, but (understandably) got an error.

Any help would be appreciated.  Thank you.

Dave Dave, 10 years ago

Hi, forgive my answer if it's way off, I'm not the resident API guru, but are you definitely using the Subscriber.AddWithCustomFields method instead of just Subscriber.Add?

Let me know if that's not the problem and I'll pass this on to someone who can help you further.

akv2, 10 years ago

Thank you for the response...

I suppose I might be able to use Subscriber.AddWithCustomFields, however I am unaware of how to use that with the Ruby wrapper.  I guess I was hoping for a ruby method so that I don't have to jump through any hoops.  I searched the Campaign Monitor RDocs and have found nothing on any sort of 'add_subscriberwithcustomfields' method.  It may not have been worked in yet, or no documentation on using this Subscriber.AddWithCustomFields method (or I just can't find it).

Again, this is what I have in my controller...

@cm =
@cm.add_subscriber(list_id,, @user.full_name)

Have you successfully used Subscriber.AddWithCustomFields in a ruby controller before?  And if so, was it pretty simple?

akv2, 10 years ago

Is anyone able to help me?

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