Use this JSON file to add or update subscribers to a database list.
JSON Request Example:
/** * Lists::AddOrUpdateSubscribers * * Add subscribers to a list, or update them if they already exist. * * list [int, required]: list id * tag [array of int|string, optional]: list of tag ids or names to add all subscribers to * format [string, optional]: preferred email format for all subscribers * confirmed [bool, optional]: default confirmed value for all subscribers * timezone [string, optional]: default timezone for all subscribers * add_to_autoresponders [bool, optional]: add new subscriber(s) to autoresponders for this list * send_confirmation [bool, optional]: send a confirmation email to new subscribers * send_newsletter [int|string, optional]: send newsletter (id or name) to new subscribers * contact [array of objects, required] * email [string, required]: contact email address * mobilephone [phone, optional]: mobile phone number * tag [array of int|string, optional]: list of tag ids or names to add this subscriber to * format [string, optional]: preferred email format for this subscriber * ipaddress [ipaddr, optional]: subscription-ipaddress for this subscriber * confirmed [bool, optional, default false]: mark this subscriber confirmed * timezone [string, optional]: timezone for this subscriber * add_to_autoresponders [bool, optional, default false]: add this subscriber to autoresponders for this list * send_confirmation [bool, optional, default false]: send a confirmation email to this subscriber * send_newsletter [int|string, optional]: send newsletter (id or name) to this subscriber * customfield [array, optional] * fieldid [int|string, required]: customfield id or name * value [mixed, required]: customfield value * return_data [bool, optional, default false]: return data identifying adds and updates * include_membership [bool, optional, default false]: include tagged-list membership in return data */ { "username": "matbt@pinpointe.com", "usertoken": "xxxxx", "requesttype": "Lists", "requestmethod": "AddOrUpdateSubscribers", "details": { "list": "{*list_id*}", /* required */ "tag": ["{*tag_id or tag_name*}", "{*tag_id or tag_name*}"], "format": "{*email_format*}", "confirmed": "{*confirmed_boolean*}", "timezone": "{*timezone*}", "add_to_autoresponders": "{*add_to_autoresponders_boolean*}", "send_confirmation": "{*send_confirmation_boolean*}", "send_newsletter": "{*newsletter_id or newsletter_name*}", "contact": [ { /* required: at least one */ "email": "{*email_address*}", /* required */ "mobilephone": "{*mobile_phone*}", "tag": ["{*tag_id or tag_name*}", "{*tag_id or tag_name*}"], "format": "{*email_format*}", "ipaddress": "{*ip_address*}", "confirmed": "{*confirmed_boolean*}", "timezone": "{*timezone*}", "add_to_autoresponders": "{*add_to_autoresponders_boolean*}", "send_confirmation": "{*send_confirmation_boolean*}", "send_newsletter": "{*newsletter_id or newsletter_name*}", "customfield": [ { "fieldid": "{*custom_field_id*}", "value": "{*custom_field_value*}" }, { "fieldid": "{*custom_field_id*}", "value": "{*custom_field_value*}" } ] }, { "email": "{*email_address*}", /* required */ "mobilephone": "{*mobile_phone*}", "tag": ["{*tag_id or tag_name*}", "{*tag_id or tag_name*}"], "format": "{*email_format*}", "ipaddress": "{*ip_address*}", "confirmed": "{*confirmed_boolean*}", "timezone": "{*timezone*}", "add_to_autoresponders": "{*add_to_autoresponders_boolean*}", "send_confirmation": "{*send_confirmation_boolean*}", "send_newsletter": "{*newsletter_id or newsletter_name*}", "customfield": [ { "fieldid": "{*custom_field_id*}", "value": "{*custom_field_value*}" }, { "fieldid": "{*custom_field_id*}", "value": "{*custom_field_value*}" } ] } ], "return_data": "{*return_data_boolean*}", "include_membership": "{*include_membership_boolean*}" } }
"json_request" element
Field Name | Description |
username | Username used to login to Pinpointe |
usertoken | Unique token assigned to Pinpointe account |
requesttype | Lists |
requestmethod | AddorUpdateSubscribers |
Please note: ALL OPTIONAL elements that are not used should be deleted from submitted call. For example, if "list" element is used, "name": "{*list_name*}" should be deleted.
"details" element
Note: List and at least one other field is required)
Field Name | Description |
list (Required) | Find the database mailing list with this ID number. |
tag | Find the tag (tag id, tag name) |
format | Preferred email format (text, html) |
confirmed | Default is confirmed for all subscribers (true, false) |
timezone | Time zone for subscribers |
add_to_autoresponders | If the user should be added to autoresponders, the default is false (true, false) |
send_confirmation | Send a confirmation email to this subscriber; default false (true, false) |
send_newsletter | Send newsletter to this subscriber, ID or name |
customfield | fieldID, ID or name value, customfield value |
Successful Response:
"response" element
Field Name | Description |
status | Will return SUCCESS if list was successfully found |
data | Contact ID number |
Unsuccessful Response:
"response" element
Field Name | Description |
status | Will return FAILED when unsuccessful |
errormessage | Text explaining why request failed |