Skip to content

Instantly share code, notes, and snippets.

// subscribe to notification
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveTestNotification:) name:[Wootric surveyDidDisappearNotification] object:nil];
- (void) receiveTestNotification:(NSNotification *) notification
{
if ([[notification name] isEqualToString:[Wootric surveyWillAppearNotification]]){
NSLog (@"Survey will be presented!");
} else if ([[notification name] isEqualToString:[Wootric surveyWillDisappearNotification]]){
NSLog (@"Survey will disappear!");
} else if ([[notification name] isEqualToString:[Wootric surveyDidAppearNotification]]){
# Payload
{
"end_users": "[{ \"phone_number\":\"+17862927907\", \"external_id\": \"sms_external_id_1\", \"properties\": {\"name\": \"Diego\",\"role\": \"Developer\",\"city\": \"Ayampe\"}}, { \"phone_number\":\"+15126636854\", \"external_id\": \"sms_external_id_2\", \"properties\": {\"name\": \"Prabhat\",\"role\": \"CTO\",\"city\": \"San Jose\"}}]",
"survey_immediately": true,
"show_disclaimer": true,
"custom_disclaimer_message": "*SMS rates apply",
"intro": "Hi, please answer this survey.",
"survey_settings": {
"language" : "EN",
"product_name": "Wootric"
@diegoserranoa
diegoserranoa / gist:e51a1e77197d48657062a1c060eed1c0
Last active November 26, 2018 23:14
SMS API sample request
curl -H "content-type: application/json" \
-H "Authorization: Bearer <your_token>" \
"http://api.wootric.com/v1/sms_survey" \
-d {
"end_users": "[{\"phone_number\":\"+17862960233\", \"properties\": {\"country\": \"USA\"}}]",
"survey_immediately": true,
"show_disclaimer": true,
"custom_disclaimer_message": "*disclaimer message",
"intro": "test intro",
"survey_settings": {"product_name": "Custom Product", "language": "FR"}