Introduction
Welcome to the SendOut API! You can use our API to access SendOut API endpoints which can be used to
- Retrieve all Forms
- Retrieve all Subscribers
- Retrieve all Campaigns
- Subscribe to Forms
- Subscribe to Drip Campaigns
- Segment a Subscriber
- Tag a Subscriber
- Unsubscribe a Subscriber
- View Form, Campaign, Segment & Tag Subscriptions
- Remove Subscriber From Segment
- Remove Tag from Subscriber
The API is organized around REST. All requests should be made over SSL. All request and response bodies, including errors, are encoded in JSON.
You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.
Subscribers
Get All Subscribers
require 'HTTParty'
response = HTTParty.get('https://api.sendout.io/v1/subscribers/api_key=<your_api_key>&api_secret=<your_api_secret>')
response = requests.get('https://api.sendout.io/v1/subscribers/api_key=<your_api_key>&api_secret=<your_api_secret>')
curl "https://api.sendout.io/v1/subscribers/api_key=<your_api_key>&api_secret=<your_api_secret>"
Make sure to replace
<your_api_key>with your API key &<your_api_secret>with your API secret.
The above command returns JSON structured like this:
{
"subscribers": [
{
"id": 29,
"name": "John",
"email": "john@example.com",
"status": 0,
"score": 0,
"created_at": "2016-12-24T06:33:08.022Z"
},
{
"id": 27,
"name": "Tom",
"email": "tom@example.com",
"status": 1,
"score": 0,
"created_at": "2016-11-23T05:21:47.354Z"
}
],
"meta": {
"total": 1,
"page": 1
}
}
This endpoint retrieves all subscribers.
HTTP Request
GET https://api.sendout.io/v1/subscribers
Query Parameters
| Parameter | Description |
|---|---|
| api_key | required |
| api_secret | required |
| page | For paginated results |
| from | format dd-mm-yyyy |
| to | format dd-mm-yyyy |
| sort_order | If set to false, the result will include kittens that have already been adopted. |
| sort_field | If set to false, the result will include kittens that have already been adopted. |
Get a Specific Subscriber
require 'HTTParty'
response = HTTParty.get('https://api.sendout.io/v1/subscribers/29?api_key=<your_api_key>&api_secret=<your_api_secret>')
response = requests.get('https://api.sendout.io/v1/subscribers/29?api_key=<your_api_key>&api_secret=<your_api_secret>')
curl "https://api.sendout.io/v1/subscribers/29?api_key=<your_api_key>&api_secret=<your_api_secret>"
Make sure to replace
<your_api_key>with your API key &<your_api_secret>with your API secret.
The above command returns JSON structured like this:
{
"subscriber": {
"id": 29,
"name": "John",
"email": "john@example.com",
"created_at": "2016-12-24T06:33:08.022Z"
}
}
This endpoint retrieves a specific subscriber.
HTTP Request
GET https://api.sendout.io/v1/subscriber/<subscriber_id>
URL Parameters
| Parameter | Description |
|---|---|
| api_key | required |
| api_secret | required |
Unsubscribe a subscriber
require 'HTTParty'
response = HTTParty.post('https://api.sendout.io/v1/subscribers/unsubscribe', { :body =>
'{ "api_secret": "<your_api_secret>",
"api_key": "<your_api_key>",
"email": "john@example.com",
}'
})
import json
url = 'https://api.sendout.io/v1/subscribers/unsubscribe'
payload = { "api_secret": "<your_api_secret>",
"api_key": "<your_api_key>",
"email": "john@example.com",
}
headers = {'content-type': 'application/json'}
response = requests.post(url, data=json.dumps(payload), headers=headers)
curl -x POST "https://api.sendout.io/v1/subscribers/unsubscribe"
-d '{ "api_secret": "<your_api_secret>", \
"api_key": "<your_api_key>", \
"email": "john@example.com", \
}'
Make sure to replace
<your_api_key>with your API key &<your_api_secret>with your API secret.
The above command returns JSON structured like this:
{
"subscriber": {
"id": 29,
"name": "John",
"email": "john@example.com",
"created_at": "2016-12-24T06:33:08.022Z"
}
}
This endpoint retrieves a specific subscriber.
HTTP Request
POST https://api.sendout.io/v1/subscribers/unsubscribe
URL Parameters
| Parameter | Description |
|---|---|
| api_key | required |
| api_secret | required |
| Email of the subscriber |
Forms
Get All Forms
require 'HTTParty'
response = HTTParty.get('https://api.sendout.io/v1/forms/?api_key=<your_api_key>&api_secret=<your_api_secret>')
response = requests.get('https://api.sendout.io/v1/forms?api_key=<your_api_key>&api_secret=<your_api_secret>')
curl "https://api.sendout.io/v1/forms/?api_key=<your_api_key>&api_secret=<your_api_secret>"
Make sure to replace
<your_api_key>with your API key &<your_api_secret>with your API secret.
The above command returns JSON structured like this:
{
"forms": [
{
"id": 23,
"name": "Homepage Form",
"created_at": "2016-10-05T17:51:56.585Z",
"embed_js": "https://content.sendout.io/test/forms/23/script.js",
"embed_js_id": "sendout-script_test23"
},
{
"id": 27,
"name": "Blog Form",
"created_at": "2016-10-09T05:15:31.092Z",
"embed_js": "https://content.sendout.io/test/forms/27/script.js",
"embed_js_id": "sendout-script_test27"
},
]
}
This endpoint retrieves all forms.
HTTP Request
GET https://api.sendout.io/v1/forms/
URL Parameters
| Parameter | Description |
|---|---|
| api_key | required |
| api_secret | required |
Get Form Subscriptions
require 'HTTParty'
response = HTTParty.get('https://api.sendout.io/v1/forms/<form_id>/subscriptions/?api_key=<your_api_key>&api_secret=<your_api_secret>')
response = requests.get('https://api.sendout.io/v1/forms/<form_id>/subscriptions/?api_key=<your_api_key>&api_secret=<your_api_secret>')
curl "https://api.sendout.io/v1/forms/<form_id>/subscriptions/?api_key=<your_api_key>&api_secret=<your_api_secret>"
Make sure to replace
<your_api_key>with your API key &<your_api_secret>with your API secret.
The above command returns JSON structured like this:
{
"subscriptions": [
{
"id": 8,
"created_at": "2016-11-23T05:38:07.422Z",
"subscriber": {
"id": 20,
"name": "John",
"email": "John@example.com",
"created_at": "2016-07-14T12:13:41.525Z",
"status": 2,
"score": 0
}
},
{
"id": 9,
"created_at": "2016-11-23T05:38:14.245Z",
"subscriber": {
"id": 21,
"name": "Tom",
"email": "tom@example.com",
"created_at": "2016-07-14T12:13:41.525Z",
"score": 0
}
}
]
}
This endpoint retrieves form subscriptions.
HTTP Request
GET https://api.sendout.io/v1/forms/<form_id>/subscriptions
URL Parameters
| Parameter | Description |
|---|---|
| api_key | required |
| api_secret | required |
Subscribe to Form
require 'HTTParty'
response = HTTParty.post('https://api.sendout.io/v1/forms/1/subscribe', { :body =>
'{ "api_secret": "<your_api_secret>",
"api_key": "<your_api_key>",
"email": "john@example.com",
}'
})
import json
url = 'https://api.sendout.io/v1/forms/1/subscribe'
payload = { "api_secret": "<your_api_secret>",
"api_key": "<your_api_key>",
"email": "john@example.com",
}
headers = {'content-type': 'application/json'}
response = requests.post(url, data=json.dumps(payload), headers=headers)
curl -x POST "https://api.sendout.io/v1/forms/1/subscribe"
-d '{ "api_secret": "<your_api_secret>", \
"api_key": "<your_api_key>", \
"email": "jon@example.com", \
}'
Make sure to replace
<your_api_key>with your API key &<your_api_secret>with your API secret.
The above command returns JSON structured like this:
{
"subscription": {
"id": 15,
"created_at": "2016-12-29T14:44:21.881Z",
"subscriber": {
"id": 30,
"name": "john",
"email": "john@example.com",
"created_at": "2016-12-29T14:44:21.690Z",
"score": 0
}
}
}
This endpoint subscribes a subscriber to a form.
HTTP Request
POST https://api.sendout.io/v1/forms/<form_id>/subscribe
URL Parameters
| Parameter | Description |
|---|---|
| api_key | required |
| api_secret | required |
| Email of the subscriber (subscriber will be created if does not exist) |
Campaigns
Get All Campaigns
require 'HTTParty'
response = HTTParty.get('https://api.sendout.io/v1/campaigns?api_key=<your_api_key>&api_secret=<your_api_secret>')
response = requests.get('https://api.sendout.io/v1/campaigns?api_key=<your_api_key>&api_secret=<your_api_secret>')
curl "https://api.sendout.io/v1/campaigns/?api_key=<your_api_key>&api_secret=<your_api_secret>"
Make sure to replace
<your_api_key>with your API key &<your_api_secret>with your API secret.
The above command returns JSON structured like this:
{
"campaigns": [
{
"id": 12,
"name": "Web course campaign",
"created_at": "2016-11-20T15:22:25.296Z"
},
{
"id": 14,
"name": "Webinar campaign",
"created_at": "2016-11-30T15:47:15.562Z"
}
]
}
This endpoint retrieves all campaigns.
HTTP Request
GET https://api.sendout.io/v1/campaigns/
URL Parameters
| Parameter | Description |
|---|---|
| api_key | required |
| api_secret | required |
Get Campaign Subscriptions
require 'HTTParty'
response = HTTParty.get('https://api.sendout.io/v1/campaigns/<campaign_id>/subscriptions/?api_key=<your_api_key>&api_secret=<your_api_secret>')
response = requests.get('https://api.sendout.io/v1/campaigns/<campaign_id>/subscriptions/?api_key=<your_api_key>&api_secret=<your_api_secret>')
curl "https://api.sendout.io/v1/campaigns/<campaign_id>/subscriptions/?api_key=<your_api_key>&api_secret=<your_api_secret>"
Make sure to replace
<your_api_key>with your API key &<your_api_secret>with your API secret.
The above command returns JSON structured like this:
{
"subscriptions": [
{
"id": 8,
"created_at": "2016-11-23T05:38:07.422Z",
"subscriber": {
"id": 20,
"name": "John",
"email": "John@example.com",
"created_at": "2016-07-14T12:13:41.525Z",
"status": 2,
"score": 0
}
},
{
"id": 9,
"created_at": "2016-11-23T05:38:14.245Z",
"subscriber": {
"id": 21,
"name": "Tom",
"email": "tom@example.com",
"created_at": "2016-07-14T12:13:41.525Z",
"score": 0
}
}
]
}
This endpoint retrieves campaign subscriptions.
HTTP Request
GET https://api.sendout.io/v1/campaigns/<campaign_id>/subscriptions
URL Parameters
| Parameter | Description |
|---|---|
| api_key | required |
| api_secret | required |
Subscribe to Campaign
require 'HTTParty'
response = HTTParty.post('https://api.sendout.io/v1/campaigns/1/subscribe', { :body =>
'{ "api_secret": "<your_api_secret>",
"api_key": "<your_api_key>",
"email": "john@example.com",
}'
})
import json
url = 'https://api.sendout.io/v1/campaigns/1/subscribe'
payload = { "api_secret": "<your_api_secret>",
"api_key": "<your_api_key>",
"email": "john@example.com",
}
headers = {'content-type': 'application/json'}
response = requests.post(url, data=json.dumps(payload), headers=headers)
curl -x POST "https://api.sendout.io/v1/campaigns/1/subscribe"
-d '{ "api_secret": "<your_api_secret>", \
"api_key": "<your_api_key>", \
"email": "jon@example.com", \
}'
Make sure to replace
<your_api_key>with your API key &<your_api_secret>with your API secret.
The above command returns JSON structured like this:
{
"subscription": {
"id": 15,
"created_at": "2016-12-29T14:44:21.881Z",
"subscriber": {
"id": 30,
"name": "john",
"email": "john@example.com",
"created_at": "2016-12-29T14:44:21.690Z",
"score": 0
}
}
}
This endpoint subscribes a subscriber to a campaign.
HTTP Request
POST https://api.sendout.io/v1/campaigns/<campaign_id>/subscribe
URL Parameters
| Parameter | Description |
|---|---|
| api_key | required |
| api_secret | required |
| Email of the subscriber | |
| name | (optional) |
Segments
Get All Segments
require 'HTTParty'
response = HTTParty.get('https://api.sendout.io/v1/segments/api_key=<your_api_key>&api_secret=<your_api_secret>')
response = requests.get('https://api.sendout.io/v1/segments/api_key=<your_api_key>&api_secret=<your_api_secret>')
curl "https://api.sendout.io/v1/segments/?api_key=<your_api_key>&api_secret=<your_api_secret>"
Make sure to replace
<your_api_key>with your API key &<your_api_secret>with your API secret.
The above command returns JSON structured like this:
{
"segments": [
{
"id": 28,
"name": "webinar viewers",
"created_at": "2016-11-01T02:27:35.724Z"
},
{
"id": 29,
"name": "blog visitors",
"created_at": "2016-11-23T05:23:13.998Z"
}
]
}
This endpoint retrieves all segments.
HTTP Request
GET https://api.sendout.io/v1/segments/
URL Parameters
| Parameter | Description |
|---|---|
| api_key | required |
| api_secret | required |
Get Segment Subscriptions
require 'HTTParty'
response = HTTParty.get('https://api.sendout.io/v1/segments/<segment_id>/subscriptions/?api_key=<your_api_key>&api_secret=<your_api_secret>')
response = requests.get('https://api.sendout.io/v1/segments/<segment_id>/subscriptions/?api_key=<your_api_key>&api_secret=<your_api_secret>')
curl "https://api.sendout.io/v1/segments/<segment_id>/subscriptions/?api_key=<your_api_key>&api_secret=<your_api_secret>"
Make sure to replace
<your_api_key>with your API key &<your_api_secret>with your API secret.
The above command returns JSON structured like this:
{
"subscriptions": [
{
"id": 8,
"created_at": "2016-11-23T05:38:07.422Z",
"subscriber": {
"id": 20,
"name": "John",
"email": "John@example.com",
"created_at": "2016-07-14T12:13:41.525Z",
"status": 2,
"score": 0
}
},
{
"id": 9,
"created_at": "2016-11-23T05:38:14.245Z",
"subscriber": {
"id": 21,
"name": "Tom",
"email": "tom@example.com",
"created_at": "2016-07-14T12:13:41.525Z",
"score": 0
}
}
]
}
This endpoint retrieves segment subscriptions.
HTTP Request
GET https://api.sendout.io/v1/segments/<segment_id>/subscriptions
URL Parameters
| Parameter | Description |
|---|---|
| api_key | required |
| api_secret | required |
Add To Segment
require 'HTTParty'
response = HTTParty.post('https://api.sendout.io/v1/segments/1/subscribe', { :body =>
'{ "api_secret": "<your_api_secret>",
"api_key": "<your_api_key>",
"email": "john@example.com",
}'
})
import json
url = 'https://api.sendout.io/v1/segments/1/subscribe'
payload = { "api_secret": "<your_api_secret>",
"api_key": "<your_api_key>",
"email": "john@example.com",
}
headers = {'content-type': 'application/json'}
response = requests.post(url, data=json.dumps(payload), headers=headers)
curl -x POST "https://api.sendout.io/v1/segments/1/subscribe"
-d '{ "api_secret": "<your_api_secret>", \
"api_key": "<your_api_key>", \
"email": "jon@example.com", \
}'
Make sure to replace
<your_api_key>with your API key &<your_api_secret>with your API secret.
The above command returns JSON structured like this:
{
"subscription": {
"id": 15,
"created_at": "2016-12-29T14:44:21.881Z",
"subscriber": {
"id": 30,
"name": "john",
"email": "john@example.com",
"created_at": "2016-12-29T14:44:21.690Z",
"score": 0
}
}
}
This endpoint add a specific subscriber to a segment.
HTTP Request
POST https://api.sendout.io/v1/segments/<segment_id>/subscribe
URL Parameters
| Parameter | Description |
|---|---|
| api_key | required |
| api_secret | required |
| Email of the subscriber |
Remove from Segment
require 'HTTParty'
response = HTTParty.delete('https://api.sendout.io/v1/subscribers/1/segments/1', { :body =>
'{ "api_secret": "<your_api_secret>",
"api_key": "<your_api_key>",
}'
})
import json
url = 'https://api.sendout.io/v1/subscribers/1/segments/1'
payload = { "api_secret": "<your_api_secret>",
"api_key": "<your_api_key>",
}
headers = {'content-type': 'application/json'}
response = requests.delete(url, data=json.dumps(payload), headers=headers)
curl -x DELETE "https://api.sendout.io/v1/subscribers/1/segments/1"
-d '{ "api_secret": "<your_api_secret>", \
"api_key": "<your_api_key>", \
}'
Make sure to replace
<your_api_key>with your API key &<your_api_secret>with your API secret.
The above command returns JSON structured like this:
{
"subscription": {
"id": 15,
"created_at": "2016-12-29T14:44:21.881Z",
"subscriber": {
"id": 30,
"name": "john",
"email": "john@example.com",
"created_at": "2016-12-29T14:44:21.690Z",
"score": 0
}
}
}
This endpoint removes a specific subscriber from a segment.
HTTP Request
DELETE https://api.sendout.io/v1/subscribers/<subscriber_id>/segments/<segment_id>
URL Parameters
| Parameter | Description |
|---|---|
| api_key | required |
| api_secret | required |
| Email of the subscriber |
Tags
Get All Tags
require 'HTTParty'
response = HTTParty.get('https://api.sendout.io/v1/tags/?api_key=<your_api_key>&api_secret=<your_api_secret>')
response = requests.get('https://api.sendout.io/v1/tags/?api_key=<your_api_key>&api_secret=<your_api_secret>')
curl "https://api.sendout.io/v1/tags/?api_key=<your_api_key>&api_secret=<your_api_secret>"
Make sure to replace
<your_api_key>with your API key &<your_api_secret>with your API secret.
The above command returns JSON structured like this:
{
"tags": [
{
"id": 28,
"name": "purchased product",
"created_at": "2016-11-01T02:27:35.724Z"
},
{
"id": 29,
"name": "completed drip course",
"created_at": "2016-11-23T05:23:13.998Z"
}
]
}
This endpoint retrieves all tags.
HTTP Request
GET https://api.sendout.io/v1/tags/
URL Parameters
| Parameter | Description |
|---|---|
| api_key | required |
| api_secret | required |
Get Tag Subscriptions
require 'HTTParty'
response = HTTParty.get('https://api.sendout.io/v1/tags/<tag_id>/subscriptions/?api_key=<your_api_key>&api_secret=<your_api_secret>')
response = requests.get('https://api.sendout.io/v1/tags/<tag_id>/subscriptions/?api_key=<your_api_key>&api_secret=<your_api_secret>')
curl "https://api.sendout.io/v1/tags/<tag_id>/subscriptions/?api_key=<your_api_key>&api_secret=<your_api_secret>"
Make sure to replace
<your_api_key>with your API key &<your_api_secret>with your API secret.
The above command returns JSON structured like this:
{
"subscriptions": [
{
"id": 8,
"created_at": "2016-11-23T05:38:07.422Z",
"subscriber": {
"id": 20,
"name": "John",
"email": "John@example.com",
"created_at": "2016-07-14T12:13:41.525Z",
"status": 2,
"score": 0
}
},
{
"id": 9,
"created_at": "2016-11-23T05:38:14.245Z",
"subscriber": {
"id": 21,
"name": "Tom",
"email": "tom@example.com",
"created_at": "2016-07-14T12:13:41.525Z",
"score": 0
}
}
]
}
This endpoint retrieves tag subscriptions.
HTTP Request
GET https://api.sendout.io/v1/tags/<tag_id>/subscriptions
URL Parameters
| Parameter | Description |
|---|---|
| api_key | required |
| api_secret | required |
Add Tag To Subscriber
require 'HTTParty'
response = HTTParty.post('https://api.sendout.io/v1/tags/1/subscribe', { :body =>
'{ "api_secret": "<your_api_secret>",
"api_key": "<your_api_key>",
"email": "john@example.com",
}'
})
import json
url = 'https://api.sendout.io/v1/tags/1/subscribe'
payload = { "api_secret": "<your_api_secret>",
"api_key": "<your_api_key>",
"email": "john@example.com",
}
headers = {'content-type': 'application/json'}
response = requests.post(url, data=json.dumps(payload), headers=headers)
curl -x POST "https://api.sendout.io/v1/tags/1/subscribe"
-d '{ "api_secret": "<your_api_secret>", \
"api_key": "<your_api_key>", \
"email": "jon@example.com", \
}'
Make sure to replace
<your_api_key>with your API key &<your_api_secret>with your API secret.
The above command returns JSON structured like this:
{
"subscription": {
"id": 15,
"created_at": "2016-12-29T14:44:21.881Z",
"subscriber": {
"id": 30,
"name": "john",
"email": "john@example.com",
"created_at": "2016-12-29T14:44:21.690Z",
"score": 0
}
}
}
This endpoint retrieves adds a tag to a specific subscriber.
HTTP Request
POST https://api.sendout.io/v1/tags/<tag_id>/subscribe
URL Parameters
| Parameter | Description |
|---|---|
| api_key | required |
| api_secret | required |
| Email of the subscriber |
Remove Tag
require 'HTTParty'
response = HTTParty.delete('https://api.sendout.io/v1/subscribers/1/tags/1', { :body =>
'{ "api_secret": "<your_api_secret>",
"api_key": "<your_api_key>",
}'
})
import json
url = 'https://api.sendout.io/v1/subscribers/1/tags/1'
payload = { "api_secret": "<your_api_secret>",
"api_key": "<your_api_key>",
}
headers = {'content-type': 'application/json'}
response = requests.delete(url, data=json.dumps(payload), headers=headers)
curl -x DELETE "https://api.sendout.io/v1/subscribers/1/tags/1"
-d '{ "api_secret": "<your_api_secret>", \
"api_key": "<your_api_key>", \
}'
Make sure to replace
<your_api_key>with your API key &<your_api_secret>with your API secret.
The above command returns JSON structured like this:
{
"subscription": {
"id": 15,
"created_at": "2016-12-29T14:44:21.881Z",
"subscriber": {
"id": 30,
"name": "john",
"email": "john@example.com",
"created_at": "2016-12-29T14:44:21.690Z",
"score": 0
}
}
}
This endpoint removes tag from a specific subscriber.
HTTP Request
DELETE https://api.sendout.io/v1/subscribers/<subscriber_id>/segments/<tag_id>
URL Parameters
| Parameter | Description |
|---|---|
| api_key | required |
| api_secret | required |
| Email of the subscriber |
Errors
The SendOut API uses the following error codes:
| Error Code | Meaning |
|---|---|
| 400 | Bad Request – Bad Request |
| 401 | Unauthorized – Your API key is wrong |
| 404 | Not Found – The specified kitten could not be found |
| 406 | Not Acceptable – You requested a format that isn’t json |
| 50X | Internal Server Error – The resource does not exist. |