Add one subscriber to a pre-existing mailing list. Set subscriber details email address, confirmation status and optional custom fields. You can specify whether to add that subscriber to autoresponders and whether they will receive HTML or text-based mailings.
Note: This API call can also be found under the requesttype of "Lists".
XML Request Example:
<?xml version="1.0" encoding="UTF-8"?> <xmlrequest> <username>JohnDoe</username> <usertoken>abc123abc123abc123abc123</usertoken> <requesttype>Subscribers</requesttype> <requestmethod>AddSubscriberToList</requestmethod> <details> <email>{*email_address*}</email> <!-- required --> <list>{*list_id*}</list> <!-- required --> <add_to_autoresponders>{*add_to_autoresponders_boolean*}</add_to_autoresponders> <send_confirmation>{*send_confirmation_boolean*}</send_confirmation> <update_if_exists>{*update_if_exists_boolean*}</update_if_exists> <format>{*email_format*}</format> <ipaddress>{*ip_address*}</ipaddress> <confirmed>{*confirmed_boolean*}</confirmed> <tag>{*tag_id or tag_name*}</tag> <tag>{*tag_id or tag_name*}</tag> <customfield> <fieldid>{*custom_field_id*}</fieldid> <value>{*custom_field_value*}</value> </customfield> <customfield> <fieldid>{*custom_field_id*}</fieldid> <value>{*custom_field_value*}</value> </customfield> <return_data>{*return_data_boolean*}</return_data> <include_membership>{*include_membership_boolean*}</include_membership> </details> </xmlrequest>
Field Name | Description |
username | Username used to login to Pinpointe |
usertoken | Unique token assigned to Pinpointe account |
requesttype | Subscribers |
requestmethod | AddSubscriberToList |
Please note: ALL OPTIONAL tags that are not used should be deleted from submitted call. For example, if no IP address will be supplied as part of the call, <ipaddress></ipaddress> should be deleted.
<details> element
Field Name | Description |
email (Required) | Address of contact to be added. |
list (Required) | Add contact to the database mailing list with this ID number. |
add_to_autoresponders | Adds contact to autoresponders, if they exist using true, 1 or yes If you do not wish to add contact to autoresponders, enter a value of false, 0 or no. false is default. |
send_confirmation | Use true, 1 or yes to automatically send confirmation email to contact if <confirmed> tag set to false, 0 or no. Set <send_confirmation> to false, 0 or no if you do NOT want to send a confirmation email. |
update_if_exists | Set as true, 1 or yes to update contact custom fields and tags. Default is false. If you attempt to update an existing contact field value without setting this to true, 1 or yes, system will throw an error. false is default. |
format | Use html to send user HTML emails or text for plain-text. html is the default. |
ipaddress | Can add optional IP address. |
confirmed | Use true, 1 or yes to mark user as confirmed or false, 0 or no for unconfirmed. true is default |
tag | Use one or more elements to assign tag(s) to this subscriber. Values can be the tag's numeric ID or the tag name. |
<customfield> OPTIONAL
<item> element - add values for a subscriber's custom fields. Use one item element pair per custom field.
NOTE: you may insert more than one pair of <customfield> tags to update multiple custom fields.
Field Name | Description |
fieldid | ID of custom field to be added. |
value | Value of this custom field |
Please note: If no custom field data is to be sent, please delete the <customfield> tags and all inner tags to avoid a submission error. |
<return_data> and <include_membership> elements
return_data | Setting this element's value to true, 1 or yes results in the API call returning an expanded body of subscriber data required by some applications. |
include_membership | PieSync requirement: Setting this element's value to true, 1 or yes results in the API call adding a list of all tags that a subscriber is in as part of the returned information for that subscriber. |
Successful Response:
<response> element
Field Name | Description |
status | Will return SUCCESS if user was successfully added |
data | Contact ID number |
Unsuccessful Response:
<response> element
Field Name | Description |
status | Will return FAILED if unsuccessful |
errormessage | Text explaining why request failed |