Skip to main content
PUT
/
api
/
v2
/
lists
/
{ID}
/
opt_in_settings
cURL
curl "https://app.tatango.com/api/v2/lists/<ID>/opt_in_settings" -d '{"opt_in_type":"double","opt_in_requests":[{"collected_data":"zip_code","request_message":"Reply with zip code for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com","retry_message":"Incorrect zip code. Reply with zip code for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com","follow_up":true,"follow_up_hour":2,"no_response_message":"Reply with zip code for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com","opt_in_message":null,"second_opt_in_message":null,"success_action":"nextrequest"},{"collected_data":"email_address","request_message":"Thank you! Reply with email address for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com","retry_message":"Incorrect email. Reply with email address for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com","follow_up":true,"follow_up_hour":24,"no_response_message":"Reply with email address for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com","opt_in_message":null,"second_opt_in_message":null,"success_action":"nextrequest"},{"collected_data":"first_name","request_message":"Thank you! Reply with first name for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com","retry_message":"Incorrect name. Reply with your first name for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com","follow_up":true,"follow_up_hour":24,"no_response_message":"Reply with your first name for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com","opt_in_message":null,"second_opt_in_message":null,"success_action":"nextrequest"},{"collected_data":"yes","request_message":"Thank you! Reply YES for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com","retry_message":"Response not understood. Reply YES for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com","follow_up":false,"follow_up_hour":null,"opt_in_message":"ACME Retail: You agreed to receive recurring SMS/MMS msgs. Txt STOP 2 end, HELP 4 help. Msg&data rates may apply. Terms apply 12345-info.com","second_opt_in_message":"ACME Retail: Welcome back! You agreed to receive recurring SMS/MMS msgs. Txt STOP 2 end, HELP 4 help. Msg&data rates may apply. Terms apply 12345-info.com","success_action":"optinsubscriber"}]}' -X PUT \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -u [email protected]:my_api_key \
  -H "Host: example.org" \
  -H "Cookie: "
{
  "status": "Opt in settings updated",
  "opt_in_type": "double",
  "opt_in_requests": [
    {
      "bypass_opt_in_response": false,
      "collected_data": "zip_code",
      "created_at": "2016-09-07T14:10:41-07:00",
      "follow_up": true,
      "follow_up_hour": 2,
      "id": 1,
      "list_id": 10,
      "no_response_message": "Reply with zip code for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com",
      "opt_in_message": null,
      "request_message": "Reply with zip code for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com",
      "retry_message": "Incorrect zip code. Reply with zip code for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com",
      "second_opt_in_message": null,
      "success_action": "nextrequest",
      "updated_at": "2016-09-07T14:10:41-07:00"
    },
    {
      "bypass_opt_in_response": false,
      "collected_data": "email_address",
      "created_at": "2016-09-07T14:10:41-07:00",
      "follow_up": true,
      "follow_up_hour": 2,
      "id": 2,
      "list_id": 10,
      "no_response_message": "Reply with email address for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com",
      "opt_in_message": null,
      "request_message": "Thank you! Reply with email address for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com",
      "retry_message": "Incorrect email. Reply with email address for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com",
      "second_opt_in_message": null,
      "success_action": "nextrequest",
      "updated_at": "2016-09-07T14:10:41-07:00"
    },
    {
      "bypass_opt_in_response": false,
      "collected_data": "first_name",
      "created_at": "2016-09-07T14:10:41-07:00",
      "follow_up": true,
      "follow_up_hour": 2,
      "id": 3,
      "list_id": 10,
      "no_response_message": "Reply with your first name for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com",
      "opt_in_message": null,
      "request_message": "Thank you! Reply with first name for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com",
      "retry_message": "Incorrect name. Reply with your first name for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com",
      "second_opt_in_message": null,
      "success_action": "nextrequest",
      "updated_at": "2016-09-07T14:10:41-07:00"
    },
    {
      "bypass_opt_in_response": false,
      "collected_data": "yes",
      "created_at": "2016-09-07T14:10:41-07:00",
      "follow_up": true,
      "follow_up_hour": 2,
      "id": 4,
      "list_id": 10,
      "no_response_message": null,
      "opt_in_message": "ACME Retail: You agreed to receive recurring SMS/MMS msgs. Txt STOP 2 end, HELP 4 help. Msg&data rates may apply. Terms apply 12345-info.com",
      "request_message": "Thank you! Reply YES for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com",
      "retry_message": "Response not understood. Reply YES for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com",
      "second_opt_in_message": "ACME Retail: Welcome back! You agreed to receive recurring SMS/MMS msgs. Txt STOP 2 end, HELP 4 help. Msg&data rates may apply. Terms apply 12345-info.com",
      "success_action": "optinsubscriber",
      "updated_at": "2016-09-07T14:10:41-07:00"
    }
  ]
}

Request URL

PUT https://app.tatango.com/api/v2/lists/<ID>/opt_in_settings

Authorizations

Authorization
string
header
required

Tatango authenticates API requests by validating an API key passed via HTTP Basic Authentication. Use your login email as the username and your API key as the password.

Path Parameters

ID
integer
required

The ID of the list to change.

Body

application/json
opt_in_type
enum<string>
required

Opt in type (may be either "single" or "double") "single" - This opt-in type is used when you want the user to subscribe to a designated list by simply texting your opt-in keyword to your shortcode."double" - This opt-in type is used when you want the user to provide you additional information such as email, name, zip codes, etc., after texting your opt-in keyword to your shortcode, but before subscribing them to a designated list.

Available options:
single,
double
bypass_opt_in_response
boolean

If this is set to true, then the usual "first_optin_message" or "second_optin_message" that Tatango sends when someone completes the opt-in process for a list, is not sent. Customers may use this functionality if they prefer to use a scheduled after opt-in message to welcome subscribers, rather than the "first_optin_message" or "second_optin_message".

first_optin_message
string | null

This message is sent to a phone number after they've succesfully completed the single opt-in process for a specific list, and at no point in the past has been subscribed to the list. (only used with single opt-ins)

Example Message: "ACME Retail: You agreed to receive recurring SMS/MMS msgs. Txt STOP 2 end, HELP 4 help. Msg&data rates may apply. Terms apply 12345-info.com"

second_optin_message
string | null

This message is sent to a phone number after they've succesfully completed the single opt-in process for a specific list, and at some point in the past has been subscribed to the list. This happens when a phone number opts-in, opts-out, then opts-in again. (only used with single opt-ins)

Example Message: "ACME Retail: Welcome back! You agreed to receive recurring SMS/MMS msgs. Txt STOP 2 end, HELP 4 help. Msg&data rates may apply. Terms apply 12345-info.com"

opt_in_requests
object[]

Array of opt-in requests, which designate the type of information you'd like a phone number to respond to the message [request_message] with. (only used with double opt-ins)

  • Option 1
  • Option 2

Response

200 - application/json

Opt-in settings updated

status
string
required
Example:

"Opt in settings updated"

opt_in_type
enum<string>
required
Available options:
single,
double
Example:

"double"

opt_in_requests
object[]
required
  • Option 1
  • Option 2