Add a recipient to a recipient list. Double opt-in processes will not be overwritten by other opt-in processes (see <a href="https://support.optimizely.com/hc/en-us/articles/4413192291981#prioritization">Opt-in documentation</a>).
1 min
POST
https://api.campaign.episerver.net/rest/{clientId}/recipients/{recipientListId}
clientIdinteger<int64>Client ID
recipientListIdinteger<int64>Recipient list ID
acceptstringGenerated from available response content types
returnOptInMailIdboolean<p>Retrieve the mail ID for an opt-in process of type "double" or "confirmed"</p>
addressstringAddress of the recipient. Required if ID attribute differs from the address.
datastring<p>Recipient data. Configure "data.[attribute]" according to the corresponding recipient list field.Does not work with the "Try it out" feature.</p>
optinProcessIdinteger<int64><p>ID of the opt-in process</p>
recipientIdstring<p>Recipient ID (usually the email address)</p>
201The recipient was added successfully.
202<p>The recipient was added successfully, but is not immediately accessible (in case of a double opt-in).</p>
400<p>The required parameters for the recipient's creation are not provided. Ensure that "clientId", "recipientListId" and "recipientId" are added to the request.</p>
409<p>The recipient has either been blacklisted, has exceeded the bounce limit, has unsubscribed, or exists already. Ensure that "recipientId" is correct and that the recipient does not meet any of the other criteria.</p>
curl --request POST \
--url https://api.campaign.episerver.net/rest/{clientId}/recipients/{recipientListId} \
--header 'accept: application/json' \
--header 'content-type: application/x-www-form-urlencoded' \
--data 'returnOptInMailId=boolean' \
--data 'recipientId=string'