Created
May 25, 2014 23:28
-
-
Save danielfone/c0c3d3b6ba61ca836037 to your computer and use it in GitHub Desktop.
JSON API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
//-- Create a subscriber | |
// | |
// POST /api/my-brand/subscribers | |
{ | |
"subscriber": { | |
"name": "Test Subscriber", | |
"email": "[email protected]", | |
"subscribe": [ | |
'my-list-1', | |
'my-list-2' | |
], | |
"channel_data": { | |
"smtp": { | |
// email and name will be inferred from above | |
"preferred_format": "html" | |
}, | |
"sms": { | |
"phone": "555 123 456" | |
} | |
}, | |
"extra_data": { | |
"birthday": "2014-05-26", | |
"gender": "M" | |
} | |
} | |
} | |
// | |
//-- Add subscription | |
// | |
// POST /api/my-brand/subscribers | |
{ | |
"subscriber": { | |
"email": "[email protected]", | |
"subscribe": [ | |
'a-different-list' | |
], | |
} | |
} | |
// | |
//-- Unsubscribe | |
// | |
// POST /api/my-brand/subscribers | |
{ | |
"subscriber": { | |
"email": "[email protected]", | |
"unsubscribe": ['yet-another-list'], | |
} | |
} | |
// | |
//-- Record a bounce | |
// | |
// POST /api/my-brand/subscribers | |
{ | |
"subscriber": { | |
"email": "[email protected]", | |
"channel_data": { | |
"smtp": { | |
"bounced": "2014-05-26T10:45:24+12:00" | |
}, | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment