Add Subscriber

Ashley Parks -

POST /api/v2/lists/:list_id/subscribers

Parameters

Name

Description

subscriber[phone_number]

Phone number

subscriber[first_name]

(optional) First name

subscriber[last_name]

(optional) Last name

subscriber[email]

(optional) Email

subscriber[dob]

(optional) Date of birth

subscriber[zip_code]

(optional) ZIP code

subscriber[gender]

(optional) Gender

subscriber[tags]

(optional) Tag list

subscriber[custom_field]

(optional) Custom field value.

Replace custom_field with actual field name

For example if you have a custom field with a merge tag {city},

use subscriber[city] instead of subscriber[custom_field]

You need to create custom field under your list first 

Parameter Notes

  • The dob parameter must either be in MM/DD/YYYY format or YYYYMMDD format.
  • The gender parameter accepts the following parameters: "Male", "M", "Female", and "F".
  • The tags parameter accepts a comma-separated list of tags, like this: "one tag,another tag,still another tag".  Note that updating the tags will automatically overwrite the entire tag list for the subscription.

 

Request

Route

POST /api/v2/lists/XXXXX/subscribers

Body

{"subscriber":{"phone_number":"2141234567"}}

cURL

curl "https://app.tatango.com/api/v2/lists/1/subscribers" -d '{"subscriber":{"phone_number":"2141234567", "my_custom_field": "123"}}' -X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-u tatango:tatango_key_L4M0uaovGFgi-nFYEQCzxQ \
-H "Host: example.org" \
-H "Cookie: "

 

Response

Status

201 Created

Body

{"status":"Subscriber being added to campaign pending confirmation","subscriber":{"phone_number":"2141234567","first_name":"","last_name":"","email":"","dob":"","zip_code":"","gender":null,"cleaned_at":null,"subscribed_at":null,"opted_out_at":"2016-08-04T16:00:00-07:00","optin_in_progress":true, my_custom_field: "123"}}

 

Notes:

  • For this API call, you'll need an API key. For instructions on getting an API key, click here.
  • If you're attempting to add a phone number to a Broadcast ID, where the phone number has already been sent a reply yes message, but the phone number hasn't responded yes, Tatango will not send another reply YES message to that phone number. This is done to prevent unwanted text messages via the API.
  • If you're attempting to add a phone number to a Broadcast ID, where the phone number is already subscribed, no SMS message will be sent to that subscriber when you try and add them through the API.
  • If you're attempting to add a phone number to a Broadcast ID, where the phone number has previously subscribed, then unsubscribed from the campaign, Tatango will send the reply YES text message, and if the phone number replies "YES", they'll receive the "Welcome Back" SMS confirmation message.
  • This API call is to be used when a customer enters their mobile phone number into a website form, point of sale system, etc. This API call is not to be used to opt-in mobile phone numbers where the customer is not requesting the opt-in.
  • Once you add a subscriber through the API, the subscriber will be sent the following text message "Reply YES to receive these automated recurring marketing msgs. Consent not required for purchase. Msg&data rates may apply." The subscriber will then have to respond to the text message with the word "YES" or "Y". Once this has been done, that subscriber will be added to your SMS campaign, allowing you to send future SMS broadcasts to them. Until the subscriber has responded "YES" or "Y" they will not be opted into your campaign, and you can't send them messages. For more info about how this works, click here.
  • The dob parameter must either be in MM/DD/YYYY format or YYYYMMDD format.
  • The gender parameter accepts the following parameters: "Male", "M", "Female", and "F".
  • NEW: If you have any configured custom fields, you may use this API call to set them. You can provide as many custom field values as you want.

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.