Configuring Opt In Type to Double

Ashley Parks -

PUT /api/v2/lists/:list_id/opt_in_settings

Parameters

Name Description
opt_in_type Opt in type, single or double
opt_in_requests Array of opt in requests
opt_in_requests[request_message] message that will be sent to subscriber
opt_in_requests[retry_message] message that will be sent to subscriber if he will respond with invalid data
opt_in_requests[follow_up] send follow up message if customer doesn't respond?
opt_in_requests[follow_up_hour] follow up customer in how many hours/
opt_in_requests[no_response_message] content of follow up message
opt_in_requests[success_action] "nextrequest" or "optinsubscriber". should be "optinsubscriber" in last opt in request
opt_in_requests[opt_in_message] First opt in message
opt_in_requests[second_opt_in_message] Second opt in message

Request

Headers

Accept: application/json
Content-Type: application/json
Authorization: Basic dGF0YW5nbzp0YXRhbmdvX2tleV8zZ2xCNDFyb3Z1OVZkZy1pV3Vpa0p3

Host: example.org
Cookie: 

Route

PUT /api/v2/lists/1/opt_in_settings

Body

{"opt_in_type":"double","opt_in_requests":[{"collected_data":"zip_code","request_message":"Your zip code?","retry_message":"Wrong zip code, try again","follow_up":true,"follow_up_hour":2,"no_response_message":"Please let us know, what is your zip code?","success_action":"nextrequest"},{"collected_data":"email_address","request_message":"Your email?","retry_message":"Wrong email, try again","follow_up":true,"follow_up_hour":24,"no_response_message":"Please let us know, what is your email?","success_action":"nextrequest"},{"collected_data":"first_name","request_message":"Your name?","retry_message":"Wrong name, try again","follow_up":true,"follow_up_hour":24,"no_response_message":"Please let us know, what is your name?","success_action":"nextrequest"},{"collected_data":"yes","request_message":"Reply YES to join our awesome mailing list","retry_message":"Reply YES to join our awesome mailing list","follow_up":false,"follow_up_hour":24,"opt_in_message":"Welcome to our awesome mailing list.","second_opt_in_message":"Welcome back to our awesome mailing list.","success_action":"optinsubscriber"}]}

cURL

curl "https://app.tatango.com/api/v2/lists/1/opt_in_settings" -d '{"opt_in_type":"double","opt_in_requests":[{"collected_data":"zip_code","request_message":"Your zip code?","retry_message":"Wrong zip code, try again","follow_up":true,"follow_up_hour":2,"no_response_message":"Please let us know, what is your zip code?","success_action":"nextrequest"},{"collected_data":"email_address","request_message":"Your email?","retry_message":"Wrong email, try again","follow_up":true,"follow_up_hour":24,"no_response_message":"Please let us know, what is your email?","success_action":"nextrequest"},{"collected_data":"first_name","request_message":"Your name?","retry_message":"Wrong name, try again","follow_up":true,"follow_up_hour":24,"no_response_message":"Please let us know, what is your name?","success_action":"nextrequest"},{"collected_data":"yes","request_message":"Reply YES to join our awesome mailing list","retry_message":"Reply YES to join our awesome mailing list","follow_up":false,"follow_up_hour":24,"opt_in_message":"Welcome to our awesome mailing list.","second_opt_in_message":"Welcome back to our awesome mailing list.","success_action":"optinsubscriber"}]}' -X PUT \
	-H "Accept: application/json" \
	-H "Content-Type: application/json" \
	-u tatango:tatango_key_3glB41rovu9Vdg-iWuikJw \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json; charset=utf-8
X-Meta-Request-Version: 0.2.6
Content-Security-Policy: default-src https: 'self'; connect-src http: https: 'self' wss://*.intercom.io; img-src https: 'self'; script-src 'self' *.intercom.io *.intercomcdn.com 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; report-uri /uri-directive
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-XSS-Protection: 1; mode=block
X-UA-Compatible: IE=Edge,chrome=1
ETag: "0a580bead34b2e0b04af83a42c24d4c5"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 5892c9136c7ddddc847c75748ea59368
X-Runtime: 0.042067
Set-Cookie: __profilin=p%3Dt; path=/
Content-Length: 1726

Status

200 OK

Body

{"status":"Opt in settings updated","opt_in_type":"double","opt_in_requests":[{"collected_data":"zip_code","created_at":"2016-08-04T16:43:43-07:00","follow_up":true,"follow_up_hour":2,"id":1,"list_id":1,"no_response_message":"Please let us know, what is your zip code?","opt_in_message":null,"request_message":"Your zip code?","retry_message":"Wrong zip code, try again","second_opt_in_message":null,"success_action":"nextrequest","updated_at":"2016-08-04T16:43:43-07:00"},{"collected_data":"email_address","created_at":"2016-08-04T16:43:43-07:00","follow_up":true,"follow_up_hour":24,"id":2,"list_id":1,"no_response_message":"Please let us know, what is your email?","opt_in_message":null,"request_message":"Your email?","retry_message":"Wrong email, try again","second_opt_in_message":null,"success_action":"nextrequest","updated_at":"2016-08-04T16:43:43-07:00"},{"collected_data":"first_name","created_at":"2016-08-04T16:43:43-07:00","follow_up":true,"follow_up_hour":24,"id":3,"list_id":1,"no_response_message":"Please let us know, what is your name?","opt_in_message":null,"request_message":"Your name?","retry_message":"Wrong name, try again","second_opt_in_message":null,"success_action":"nextrequest","updated_at":"2016-08-04T16:43:43-07:00"},{"collected_data":"yes","created_at":"2016-08-04T16:43:43-07:00","follow_up":false,"follow_up_hour":24,"id":4,"list_id":1,"no_response_message":null,"opt_in_message":"Welcome to our awesome mailing list.","request_message":"Reply YES to join our awesome mailing list","retry_message":"Reply YES to join our awesome mailing list","second_opt_in_message":"Welcome back to our awesome mailing list.","success_action":"optinsubscriber","updated_at":"2016-08-04T16:43:43-07:00"}]}

Error Messages

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.