0

I am trying to figure out how to add a user to a list using the REST API and not the Soap API. I am unsure why the REST API has different functionality that the Soap API.

I would like to add a subscriber to a List that I created like shown in this doc:

https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/adding_subscribers_to_a_list.htm

However I cannot find the equivalent in REST API. The closest I can find is POST /contacts/v1/contacts https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/createContacts.htm which I think is different as I cannot specify to which list to subscribe.

0

SOAP API has been there long time and it is for accessing classic email, template, list, data extensions etc.

REST API is relatively new and it is for Content builder, Contact Builder, Journey Builder and MobileConnect etc.

There are only a few things “in common” that you can achieve with both APIs: data extensions, trigger sends etc.

So for your question for adding a subscriber to a list, you need to use SOAP API not REST API. The contacts endpoints in your question is for Contact Builder not for list.

0

The documentation is very specific about this:

Use the REST API for this functionality:

  • Contacts
  • Journey Builder
  • Mobile Connect
  • MobilePush
  • Campaigns
  • Triggered Sends (may also use SOAP)

Use the SOAP API for this functionality:

  • Tracking
  • Subscribers and lists <------------------
  • Automations
  • Triggered sends (may also use REST)
  • Content
  • Most other email activities

So, the functionality you want is only available (to the date of this answer at least) with the SOAP API.

There's a lot of libraries called API's starter kits for almost all languages: NodeJs, PHP, Java, .NET, Python, Ruby... that you can use and quickly consume the SOAP API with a breeze...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.