Email Campaigns
Registered From Address ¶
List Operations ¶
Get AllGET/email/senderid/
Example URI
Headers
Content-Type: application/json
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
200
Headers
Content-Type: application/json
Body
[
{
"$_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"client_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"description": "My From Address",
"email": "test@test.com",
"created_on": "2016-08-22T12:05:39.571000",
"modified_on": "2016-08-22T12:05:39.571000"
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
AddPOST/email/senderid/
Example URI
Headers
Content-Type: application/json
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
Body
{
"description": "My From Address",
"email": "test@test.com"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "An easy to remember name for the registered email."
},
"email": {
"type": "string",
"description": "A valid email that will be used as a from address when sending out email messages."
}
}
}
201
Headers
Content-Type: application/json
Body
{
"$_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"client_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"description": "My From Address",
"email": "test@test.com",
"created_on": "2016-08-22T12:05:39.571000",
"modified_on": "2016-08-22T12:05:39.571000"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"$_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "The unique id representing the resource."
}
},
"description": "The unique ID representing the resource."
},
"client_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "The unique id representing the resource."
}
},
"description": "Your client ID."
},
"description": {
"type": "string",
"description": "An easy to remember name for the registered email."
},
"email": {
"type": "string",
"description": "A valid email that will be used as a from address when sending out email messages."
},
"created_on": {
"type": "string",
"description": "The date and time on which this resource was added."
},
"modified_on": {
"type": "string",
"description": "The date and time on which this resource was last modified."
}
}
}
Detail Operations ¶
Get OneGET/email/senderid/?_id={_id}
Example URI
- _id
string
(required) Example: 57bb010e2cd5264797b017e5The unique ID representing this resource.
Headers
Content-Type: application/json
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
200
Headers
Content-Type: application/json
Body
{
"$_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"client_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"description": "My From Address",
"email": "test@test.com",
"created_on": "2016-08-22T12:05:39.571000",
"modified_on": "2016-08-22T12:05:39.571000"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"$_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "The unique id representing the resource."
}
},
"description": "The unique ID representing the resource."
},
"client_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "The unique id representing the resource."
}
},
"description": "Your client ID."
},
"description": {
"type": "string",
"description": "An easy to remember name for the registered email."
},
"email": {
"type": "string",
"description": "A valid email that will be used as a from address when sending out email messages."
},
"created_on": {
"type": "string",
"description": "The date and time on which this resource was added."
},
"modified_on": {
"type": "string",
"description": "The date and time on which this resource was last modified."
}
}
}
UpdatePUT/email/senderid/?_id={_id}
Example URI
- _id
string
(required) Example: 57bb010e2cd5264797b017e5The unique ID representing the registered number resource.
Headers
Content-Type: application/json
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
Body
{
"description": "My From Address",
"email": "test@test.com"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "An easy to remember name for the registered email."
},
"email": {
"type": "string",
"description": "A valid email that will be used as a from address when sending out email messages."
}
}
}
204
Headers
Content-Type: application/json
404
Headers
Content-Type: application/json
DeleteDELETE/email/senderid/?_id={_id}
Example URI
- _id
string
(required) Example: 57bb010e2cd5264797b017e5The unique ID representing the registered number resource.
Headers
Content-Type: application/json
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
204
Headers
Content-Type: application/json
404
Headers
Content-Type: application/json
Opt-Out ¶
List Operations ¶
Get AllGET/email/optout/
Example URI
Headers
Content-Type: application/json
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
200
Headers
Content-Type: application/json
Body
[
{
"$_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"client_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"email": "test@test.com",
"created_on": "2016-08-22T12:05:39.571000",
"modified_on": "2016-08-22T12:05:39.571000"
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
AddPOST/email/optout/
Example URI
Headers
Content-Type: application/json
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
Body
{
"email": "test@test.com"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "The email address that should be added to the blacklist."
}
}
}
201
Headers
Content-Type: application/json
Body
{
"$_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"client_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"email": "test@test.com",
"created_on": "2016-08-22T12:05:39.571000",
"modified_on": "2016-08-22T12:05:39.571000"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"$_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "The unique id representing the resource."
}
},
"description": "The unique ID representing the resource."
},
"client_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "The unique id representing the resource."
}
},
"description": "Your client ID."
},
"email": {
"type": "string",
"description": "The email address that should be added to the blacklist."
},
"created_on": {
"type": "string",
"description": "The date and time on which this resource was added."
},
"modified_on": {
"type": "string",
"description": "The date and time on which this resource was last modified."
}
}
}
Detail Operations ¶
Get OneGET/email/optout/?_id={_id}
Example URI
- _id
string
(required) Example: 57bb010e2cd5264797b017e5The unique ID representing the DNC email resource.
Headers
Content-Type: application/json
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
200
Headers
Content-Type: application/json
Body
{
"$_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"client_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"email": "test@test.com",
"created_on": "2016-08-22T12:05:39.571000",
"modified_on": "2016-08-22T12:05:39.571000"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"$_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "The unique id representing the resource."
}
},
"description": "The unique ID representing the resource."
},
"client_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "The unique id representing the resource."
}
},
"description": "Your client ID."
},
"email": {
"type": "string",
"description": "The email address that should be added to the blacklist."
},
"created_on": {
"type": "string",
"description": "The date and time on which this resource was added."
},
"modified_on": {
"type": "string",
"description": "The date and time on which this resource was last modified."
}
}
}
404
Headers
Content-Type: application/json
UpdatePUT/email/optout/?_id={_id}
Example URI
- _id
string
(required) Example: 57bb010e2cd5264797b017e5The unique ID representing the DNC email resource.
Headers
Content-Type: application/json
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
Body
{
"email": "test@test.com"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "The email address that should be added to the blacklist."
}
}
}
204
Headers
Content-Type: application/json
404
Headers
Content-Type: application/json
DeleteDELETE/email/optout/?_id={_id}
Example URI
- _id
string
(required) Example: 57bb010e2cd5264797b017e5The unique ID representing the DNC email resource.
Headers
Content-Type: application/json
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
204
Headers
Content-Type: application/json
404
Headers
Content-Type: application/json
Bulk Operations ¶
Bulk AddPOST/email/optout/bulk/add/
FormData Key | Reference |
---|---|
csv_file | The CSV file that needs to be processed. |
Example URI
Headers
Content-Type: multipart/form-data, boundary=---BOUNDARY
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
Body
---BOUNDARY
Content-Disposition: form-data; name="csv_file"; filename="your_file.csv"
Content-Type: text/csv
---BOUNDARY
200
Bulk DeletePOST/email/optout/bulk/delete/
FormData Key | Reference |
---|---|
csv_file | The CSV file that needs to be processed. |
Example URI
Headers
Content-Type: multipart/form-data, boundary=---BOUNDARY
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
Body
---BOUNDARY
Content-Disposition: form-data; name="csv_file"; filename="your_file.csv"
Content-Type: text/csv
---BOUNDARY
200
Contact Groups ¶
List Operations ¶
Get AllGET/email/contact/
Example URI
Headers
Content-Type: application/json
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
200
Headers
Content-Type: application/json
Body
[
{
"$_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"client_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"tag": "My Contact Group",
"contacts": [
{
"name": "John Doe",
"email": "test@test.com"
}
],
"created_on": "2016-08-22T12:05:39.571000",
"modified_on": "2016-08-22T12:05:39.571000"
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
AddPOST/email/contact/
Note: You can only create a contact group using this request. To manage contacts in this group, use the bulk operation endpoints listed below.
Example URI
Headers
Content-Type: application/json
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
Body
{
"tag": "My Contact Group"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"tag": {
"type": "string",
"description": "A friendly name for your contact group."
}
}
}
201
Headers
Content-Type: application/json
Body
{
"$_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"client_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"tag": "My Contact Group",
"contacts": [
{
"name": "John Doe",
"email": "test@test.com"
}
],
"created_on": "2016-08-22T12:05:39.571000",
"modified_on": "2016-08-22T12:05:39.571000"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"$_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "The unique id representing the resource."
}
},
"description": "The unique ID representing the resource."
},
"client_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "The unique id representing the resource."
}
},
"description": "Your client ID."
},
"tag": {
"type": "string",
"description": "A friendly name for your contact group."
},
"contacts": {
"type": "array"
},
"created_on": {
"type": "string",
"description": "The date and time this resource was created."
},
"modified_on": {
"type": "string",
"description": "The date and time this resource was modified."
}
}
}
Detail Operations ¶
Get OneGET/email/contact/?_id={_id}
Example URI
- _id
string
(required) Example: 57bb010e2cd5264797b017e5The unique ID representing the contact group resource.
Headers
Content-Type: application/json
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
200
Headers
Content-Type: application/json
Body
{
"$_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"client_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"tag": "My Contact Group",
"contacts": [
{
"name": "John Doe",
"email": "test@test.com"
}
],
"created_on": "2016-08-22T12:05:39.571000",
"modified_on": "2016-08-22T12:05:39.571000"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"$_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "The unique id representing the resource."
}
},
"description": "The unique ID representing the resource."
},
"client_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "The unique id representing the resource."
}
},
"description": "Your client ID."
},
"tag": {
"type": "string",
"description": "A friendly name for your contact group."
},
"contacts": {
"type": "array"
},
"created_on": {
"type": "string",
"description": "The date and time this resource was created."
},
"modified_on": {
"type": "string",
"description": "The date and time this resource was modified."
}
}
}
404
Headers
Content-Type: application/json
UpdatePUT/email/contact/?_id={_id}
Note: You can only update a contact group’s tag using this request. To manage contacts in this group, use the bulk operation endpoints listed below.
Example URI
- _id
string
(required) Example: 57bb010e2cd5264797b017e5The unique ID representing the contact group resource.
Headers
Content-Type: application/json
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
Body
{
"tag": "My Contact Group"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"tag": {
"type": "string",
"description": "A friendly name for your contact group."
}
}
}
200
Headers
Content-Type: application/json
Body
{
"$_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"client_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"tag": "My Contact Group",
"contacts": [
{
"name": "John Doe",
"email": "test@test.com"
}
],
"created_on": "2016-08-22T12:05:39.571000",
"modified_on": "2016-08-22T12:05:39.571000"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"$_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "The unique id representing the resource."
}
},
"description": "The unique ID representing the resource."
},
"client_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "The unique id representing the resource."
}
},
"description": "Your client ID."
},
"tag": {
"type": "string",
"description": "A friendly name for your contact group."
},
"contacts": {
"type": "array"
},
"created_on": {
"type": "string",
"description": "The date and time this resource was created."
},
"modified_on": {
"type": "string",
"description": "The date and time this resource was modified."
}
}
}
404
Headers
Content-Type: application/json
DeleteDELETE/email/contact/?_id={_id}
Example URI
- _id
string
(required) Example: 57bb010e2cd5264797b017e5The unique ID representing the contact group resource.
Headers
Content-Type: application/json
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
204
Headers
Content-Type: application/json
404
Headers
Content-Type: application/json
Bulk Operations ¶
Bulk ReplacePOST/email/contact/bulk/replace/?_id={_id}
Bulk replace will overwrite ALL contacts in the group with the contacts from your file. This is the recommended approach while dealing with very large contact groups.
Note: The index of the first column starts with zero.
FormData Key | Reference |
---|---|
name_index | The index of the name column in the CSV file. Note that indexes start from 0. |
email_index | The index of the email column in the CSV file. Note that indexes start from 0. |
csv_file | The CSV file that needs to be processed. |
Example URI
- _id
string
(required) Example: 57bb010e2cd5264797b017e5The unique ID representing the contact group resource.
Headers
Content-Type: multipart/form-data, boundary=---BOUNDARY
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
Body
---BOUNDARY
Content-Disposition: form-data; name="name_index"
0
---BOUNDARY
Content-Disposition: form-data; name="email_index"
1
---BOUNDARY
Content-Disposition: form-data; name="csv_file"; filename="your_file.csv"
Content-Type: text/csv
---BOUNDARY
200
Bulk UpdatePOST/email/contact/bulk/update/?_id={_id}
Bulk update let’s you add or update existing records. The CSV file uploaded should contain the name and email of the contact. Other fields in the CSV files can be added for your reference. These additional fields will be used while generating reports. The CSV file should contain a header row that identifies the various columns present.
Note: The index of the first column starts with zero.
FormData Key | Reference |
---|---|
name_index | The index of the name column in the CSV file. Note that indexes start from 0. |
email_index | The index of the email column in the CSV file. Note that indexes start from 0. |
csv_file | The CSV file that needs to be processed. |
Example URI
- _id
string
(required) Example: 57bb010e2cd5264797b017e5The unique ID representing the contact group resource.
Headers
Content-Type: multipart/form-data, boundary=---BOUNDARY
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
Body
---BOUNDARY
Content-Disposition: form-data; name="name_index"
0
---BOUNDARY
Content-Disposition: form-data; name="email_index"
1
---BOUNDARY
Content-Disposition: form-data; name="csv_file"; filename="your_file.csv"
Content-Type: text/csv
---BOUNDARY
200
Bulk DeletePOST/email/contact/bulk/delete/?_id={_id}
Bulk delete let’s you delete contacts based on their email address.
Note: The index of the first column starts with zero.
FormData Key | Reference |
---|---|
email_index | The index of the email column in the CSV file. Note that indexes start from 0. |
csv_file | The CSV file that needs to be processed. |
Example URI
- _id
string
(required) Example: 57bb010e2cd5264797b017e5The unique ID representing the contact group resource.
Headers
Content-Type: multipart/form-data, boundary=---BOUNDARY
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
Body
---BOUNDARY
Content-Disposition: form-data; name="email_index"
1
---BOUNDARY
Content-Disposition: form-data; name="csv_file"; filename="your_file.csv"
Content-Type: text/csv
---BOUNDARY
200
Message ¶
List Operations ¶
Get AllGET/email/message/
Example URI
Headers
Content-Type: application/json
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
200
Headers
Content-Type: application/json
Body
[
{
"$_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"client_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"description": "My message",
"email_message": "This is a test message.",
"created_on": "2016-08-22T12:05:39.571000",
"modified_on": "2016-08-22T12:05:39.571000"
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
AddPOST/email/message/
Example URI
Headers
Content-Type: application/json
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
Body
{
"description": "My message",
"email_message": "This is a test message."
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "A friendly name for your email. This will also be the subject of your email."
},
"email_message": {
"type": "string",
"description": "The contents of the email that will be sent to your contact group."
}
}
}
201
Headers
Content-Type: application/json
Body
{
"$_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"client_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"description": "My message",
"email_message": "This is a test message.",
"created_on": "2016-08-22T12:05:39.571000",
"modified_on": "2016-08-22T12:05:39.571000"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"$_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "The unique id representing the resource."
}
},
"description": "The unique ID representing the resource."
},
"client_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "The unique id representing the resource."
}
},
"description": "Your client ID."
},
"description": {
"type": "string",
"description": "A friendly name for your email. This will also be the subject of your email."
},
"email_message": {
"type": "string",
"description": "The contents of the email that will be sent to your contact group."
},
"created_on": {
"type": "string",
"description": "The date and time this resource was created."
},
"modified_on": {
"type": "string",
"description": "The date and time this resource was last modified."
}
}
}
Detail Operations ¶
Get OneGET/email/message/?_id={_id}
Example URI
- _id
string
(required) Example: 57bb010e2cd5264797b017e5The unique ID representing the message resource.
Headers
Content-Type: application/json
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
200
Headers
Content-Type: application/json
Body
{
"$_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"client_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"description": "My message",
"email_message": "This is a test message.",
"created_on": "2016-08-22T12:05:39.571000",
"modified_on": "2016-08-22T12:05:39.571000"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"$_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "The unique id representing the resource."
}
},
"description": "The unique ID representing the resource."
},
"client_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "The unique id representing the resource."
}
},
"description": "Your client ID."
},
"description": {
"type": "string",
"description": "A friendly name for your email. This will also be the subject of your email."
},
"email_message": {
"type": "string",
"description": "The contents of the email that will be sent to your contact group."
},
"created_on": {
"type": "string",
"description": "The date and time this resource was created."
},
"modified_on": {
"type": "string",
"description": "The date and time this resource was last modified."
}
}
}
404
Headers
Content-Type: application/json
UpdatePUT/email/message/?_id={_id}
Example URI
- _id
string
(required) Example: 57bb010e2cd5264797b017e5The unique ID representing the message resource.
Headers
Content-Type: application/json
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
Body
{
"description": "My message",
"email_message": "This is a test message."
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "A friendly name for your email. This will also be the subject of your email."
},
"email_message": {
"type": "string",
"description": "The contents of the email that will be sent to your contact group."
}
}
}
204
Headers
Content-Type: application/json
404
Headers
Content-Type: application/json
DeleteDELETE/email/message/?_id={_id}
Example URI
- _id
string
(required) Example: 57bb010e2cd5264797b017e5The unique ID representing the message resource.
Headers
Content-Type: application/json
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
204
Headers
Content-Type: application/json
404
Headers
Content-Type: application/json
Email Results ¶
List Operations ¶
Get AllGET/email/result/filter/?start_date={start_date}&end_date={end_date}&campaign_id={campaign_id}
Example URI
- start_date
string
(required) Example: 2016-08-01The date of the period from which you want results
- end_date
string
(required) Example: 2016-09-01The date of the period until which you want results
- campaign_id
string
(optional) Example: 57bb010e2cd5264797b017e5The unique id representing the campaign resource. When specified, results returned will be limited to the campaign.
Headers
Content-Type: application/json
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
200
Headers
Content-Type: application/json
Body
[
{
"$_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"client_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"queue_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"campaign_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"contact": {},
"campaign_name": "My Campaign",
"disposition": "delivered",
"start_date": "2016-08-22T12:05:39.571000",
"modified_on": "2016-08-22T12:05:39.571000",
"email_to": "test@test.com",
"email_from_id": "test@test.com",
"complete": true,
"status": "completed"
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
Campaign ¶
List Operations ¶
Get AllGET/email/campaign/
Example URI
Headers
Content-Type: application/json
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
200
Headers
Content-Type: application/json
Body
[
{
"$_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"client_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"contact_group_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"sender_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"message_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"name": "My Campaign",
"start_date": "2016-08-22T12:05:39.571000",
"timezone": "EST5EDT",
"created_on": "2016-08-22T12:05:39.571000",
"modified_on": "2016-08-22T12:05:39.571000",
"status": "active"
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
AddPOST/email/campaign/
The campaign request should be of type multipart/form-data with the following keys:
FormData Key | Reference |
---|---|
attributes | A JSON string describing the attributes of the campaign being added. |
csv_file | The CSV file containing the details of the contact group to whom the emails should be sent out. Required if the type of the contact group is upload. |
The attributes parameter is a JSON string which has the following structure:
{
"message": {},
"contact_group": {},
"schedule": {}
}
The actual parameters for each of the objects in the above structure depend on the type of the audio dialog, contact group and schedule desired. The following tables indicate acceptable values for each of these objects.
The message Object:
JSON String Key | Data Type | Reference | Required When |
---|---|---|---|
source | string | Indicates the type of message resource being used. Allowed values include: upload, new | Always |
description | number | A friendly name for the message resource. This will be used as the subject for the email. | source: new |
email_message | string | The actual email message that needs to be sent to the contacts. | source: new |
_id | $oid object | The unique ID representing the message resource. | source: reuse |
The contact_group Object:
JSON String Key | Data Type | Reference | Required When |
---|---|---|---|
type | string | Indicates the type of contact group resource being used. Allowed values include: upload, reuse | Always |
name_index | number | The index of the column in the CSV file which contains the name of the contacts. | type: upload |
email_index | number | The index of the column in the CSV file which contains the email of the contacts. | type: upload |
_id | $oid object | The unique ID representing the contact group resource. | type: reuse |
The schedule Object:
JSON String Key | Data Type | Reference | Required When |
---|---|---|---|
name | string | A friendly name for the campaign resource. | Always |
start_date | string | The start of the datetime window in which emailing can be attempted. The date should be formatted as yyyy-MM-dd HH:mm. | Always |
timezone | string | Indicates the timezone of the email start and end windows. Allowed values include: EST5EDT, CST6CDT, MST7MDT, PST8PDT | Always |
sender_id | $oid object | The unique ID representing the registered email that should be used as the from address. | Always |
Example URI
Headers
Content-Type: multipart/form-data, boundary=---BOUNDARY
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
Body
---BOUNDARY
Content-Disposition: form-data; name="attributes"
{
"message": {
"source": "new",
"description": "My Email Message",
"email_message": "This is a test message."
},
"contact_group": {
"type": "upload",
"name_index": 1,
"email_index": 0
},
"schedule": {
"name": "My Campaign",
"start_date": "2016-09-08 09:00",
"timezone": "EST5EDT",
"sender_id": {
"$oid": "57bba6fac75dae266c4aee1f"
}
}
}
---BOUNDARY
Content-Disposition: form-data; name="csv_file"; filename="your_contacts.csv"
Content-Type: text/csv
---BOUNDARY
201
Headers
Content-Type: application/json
Body
{
"$_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"client_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"contact_group_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"sender_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"message_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"name": "My Campaign",
"start_date": "2016-08-22T12:05:39.571000",
"timezone": "EST5EDT",
"created_on": "2016-08-22T12:05:39.571000",
"modified_on": "2016-08-22T12:05:39.571000",
"status": "active"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"$_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "The unique id representing the resource."
}
},
"description": "The unique ID representing the resource."
},
"client_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "The unique id representing the resource."
}
},
"description": "Your client ID."
},
"contact_group_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "The unique id representing the resource."
}
},
"description": "The unique ID representing this resource."
},
"message_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "The unique id representing the resource."
}
},
"description": "The unique ID representing this resource."
},
"name": {
"type": "string",
"description": "The name of the campaign."
},
"start_date": {
"type": "string",
"description": "The start of the date time window in which the email can be attempted."
},
"timezone": {
"type": "string",
"enum": [
"EST5EDT",
"CST6CDT",
"MST7MDT",
"PST8PDT"
],
"description": "Indicates the timezone of the email start window."
},
"sender_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "The unique id representing the resource."
}
},
"description": "The unique ID representing the registered number that should be used for the registered from address."
},
"created_on": {
"type": "string",
"description": "The date and time this resource was created."
},
"modified_on": {
"type": "string",
"description": "The date and time this resource was modified."
},
"status": {
"type": "string",
"description": "Indicates the status of the campaign."
}
}
}
Detail Operations ¶
Get OneGET/email/campaign/?_id={_id}
Example URI
- _id
string
(required) Example: 57bb010e2cd5264797b017e5The unique ID representing the campaign resource.
Headers
Content-Type: application/json
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
200
Headers
Content-Type: application/json
Body
{
"$_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"client_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"contact_group_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"sender_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"message_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"name": "My Campaign",
"start_date": "2016-08-22T12:05:39.571000",
"timezone": "EST5EDT",
"created_on": "2016-08-22T12:05:39.571000",
"modified_on": "2016-08-22T12:05:39.571000",
"status": "active"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"$_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "The unique id representing the resource."
}
},
"description": "The unique ID representing the resource."
},
"client_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "The unique id representing the resource."
}
},
"description": "Your client ID."
},
"contact_group_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "The unique id representing the resource."
}
},
"description": "The unique ID representing this resource."
},
"message_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "The unique id representing the resource."
}
},
"description": "The unique ID representing this resource."
},
"name": {
"type": "string",
"description": "The name of the campaign."
},
"start_date": {
"type": "string",
"description": "The start of the date time window in which the email can be attempted."
},
"timezone": {
"type": "string",
"enum": [
"EST5EDT",
"CST6CDT",
"MST7MDT",
"PST8PDT"
],
"description": "Indicates the timezone of the email start window."
},
"sender_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "The unique id representing the resource."
}
},
"description": "The unique ID representing the registered number that should be used for the registered from address."
},
"created_on": {
"type": "string",
"description": "The date and time this resource was created."
},
"modified_on": {
"type": "string",
"description": "The date and time this resource was modified."
},
"status": {
"type": "string",
"description": "Indicates the status of the campaign."
}
}
}
404
Headers
Content-Type: application/json
UpdatePUT/email/campaign/?_id={_id}
Example URI
- _id
string
(required) Example: 57bb010e2cd5264797b017e5The unique ID representing the campaign resource.
Headers
Content-Type: application/json
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
Body
{
"status": "active"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"active",
"paused",
"cancelled"
],
"description": "Control the status of the campaign."
}
}
}
204
Headers
Content-Type: application/json
404
Headers
Content-Type: application/json