Text Campaigns
Opt-Out ¶
List Operations ¶
Get AllGET/text/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"
},
"to": "1112223333",
"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/text/optout/
Example URI
Headers
Content-Type: application/json
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
Body
{
"to": "1112223333"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"to": {
"type": "string",
"description": "The 10 digit phone number that should be added to the blacklist."
}
}
}
201
Headers
Content-Type: application/json
Body
{
"$_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"client_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"to": "1112223333",
"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": "Unique id representing the resource."
}
},
"description": "The unique ID representing the registered number resource."
},
"client_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "Unique id representing the resource."
}
},
"description": "Your client ID."
},
"to": {
"type": "string",
"description": "The 10 digit phone number that should be added to the blacklist."
},
"created_on": {
"type": "string",
"description": "The date and time in UTC on which this resource was added."
},
"modified_on": {
"type": "string",
"description": "The date and time in UTC on which this resource was last modified."
}
}
}
Detail Operations ¶
Get OneGET/text/optout/?_id={_id}
Example URI
- _id
string
(required) Example: 57bb010e2cd5264797b017e5The unique ID representing the DNC number resource.
Headers
Content-Type: application/json
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
200
Headers
Content-Type: application/json
Body
{
"$_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"client_id": {
"$oid": "57bb010e2cd5264797b017e5"
},
"to": "1112223333",
"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": "Unique id representing the resource."
}
},
"description": "The unique ID representing the registered number resource."
},
"client_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "Unique id representing the resource."
}
},
"description": "Your client ID."
},
"to": {
"type": "string",
"description": "The 10 digit phone number that should be added to the blacklist."
},
"created_on": {
"type": "string",
"description": "The date and time in UTC on which this resource was added."
},
"modified_on": {
"type": "string",
"description": "The date and time in UTC on which this resource was last modified."
}
}
}
404
Headers
Content-Type: application/json
UpdatePUT/text/optout/?_id={_id}
Example URI
- _id
string
(required) Example: 57bb010e2cd5264797b017e5The unique ID representing the DNC number resource.
Headers
Content-Type: application/json
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
Body
{
"to": "1112223333"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"to": {
"type": "string",
"description": "The 10 digit phone number that should be added to the blacklist."
}
}
}
204
Headers
Content-Type: application/json
404
Headers
Content-Type: application/json
DeleteDELETE/text/optout/?_id={_id}
Example URI
- _id
string
(required) Example: 57bb010e2cd5264797b017e5The unique ID representing the DNC number 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/text/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/text/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/text/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",
"phone": "1112223333"
}
],
"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/text/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",
"phone": "1112223333"
}
],
"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": "Unique id representing the resource."
}
},
"description": "The unique ID representing the registered number resource."
},
"client_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "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 in UTC on which this resource was created."
},
"modified_on": {
"type": "string",
"description": "The date and time in UTC on which this resource was modified."
}
}
}
Detail Operations ¶
Get OneGET/text/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",
"phone": "1112223333"
}
],
"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": "Unique id representing the resource."
}
},
"description": "The unique ID representing the registered number resource."
},
"client_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "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 in UTC on which this resource was created."
},
"modified_on": {
"type": "string",
"description": "The date and time in UTC on which this resource was modified."
}
}
}
404
Headers
Content-Type: application/json
UpdatePUT/text/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",
"phone": "1112223333"
}
],
"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": "Unique id representing the resource."
}
},
"description": "The unique ID representing the registered number resource."
},
"client_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "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 in UTC on which this resource was created."
},
"modified_on": {
"type": "string",
"description": "The date and time in UTC on which this resource was modified."
}
}
}
404
Headers
Content-Type: application/json
DeleteDELETE/text/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/text/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. |
phone_index | The index of the phone number 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="phone_index"
1
---BOUNDARY
Content-Disposition: form-data; name="csv_file"; filename="your_file.csv"
Content-Type: text/csv
---BOUNDARY
200
Bulk UpdatePOST/text/contact/bulk/update/?_id={_id}
Bulk update let’s you add or update existing records. The CSV file uploaded should contain the name and 10 digit phone number 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. |
phone_index | The index of the phone number 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="phone_index"
1
---BOUNDARY
Content-Disposition: form-data; name="csv_file"; filename="your_file.csv"
Content-Type: text/csv
---BOUNDARY
200
Bulk DeletePOST/text/contact/bulk/delete/?_id={_id}
Bulk delete let’s you delete contacts based on their phone numbers.
Note: The index of the first column starts with zero.
FormData Key | Reference |
---|---|
phone_index | The index of the phone number 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="phone_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/text/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",
"text_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/text/message/
Example URI
Headers
Content-Type: application/json
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b
Body
{
"description": "My message",
"text_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 message."
},
"text_message": {
"type": "string",
"description": "The contents of the text message 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",
"text_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": "Unique id representing the resource."
}
},
"description": "The unique ID representing the registered number resource."
},
"client_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "Unique id representing the resource."
}
},
"description": "Your client ID."
},
"description": {
"type": "string",
"description": "A friendly name for your message."
},
"text_message": {
"type": "string",
"description": "The contents of the text message that will be sent to your contact group."
},
"created_on": {
"type": "string",
"description": "The date and time in UTC on which this resource was added."
},
"modified_on": {
"type": "string",
"description": "The date and time in UTC on which this resource was last modified."
}
}
}
Detail Operations ¶
Get OneGET/text/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",
"text_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": "Unique id representing the resource."
}
},
"description": "The unique ID representing the registered number resource."
},
"client_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "Unique id representing the resource."
}
},
"description": "Your client ID."
},
"description": {
"type": "string",
"description": "A friendly name for your message."
},
"text_message": {
"type": "string",
"description": "The contents of the text message that will be sent to your contact group."
},
"created_on": {
"type": "string",
"description": "The date and time in UTC on which this resource was added."
},
"modified_on": {
"type": "string",
"description": "The date and time in UTC on which this resource was last modified."
}
}
}
404
Headers
Content-Type: application/json
UpdatePUT/text/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",
"text_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 message."
},
"text_message": {
"type": "string",
"description": "The contents of the text message that will be sent to your contact group."
}
}
}
204
Headers
Content-Type: application/json
404
Headers
Content-Type: application/json
DeleteDELETE/text/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
Text Results ¶
List Operations ¶
Get AllGET/text/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",
"phone": "1112223333",
"caller_id": "1112223333",
"complete": true,
"status": "completed"
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
Campaign ¶
List Operations ¶
Get AllGET/text/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/text/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 texts 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. | source: new |
text_message | string | The actual text 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 |
phone_index | number | The index of the column in the CSV file which contains the phone number 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 texting can be attempted. The date should be formatted as yyyy-MM-dd HH:mm. | Always |
timezone | string | Indicates the timezone of the text start and end windows. Allowed values include: EST5EDT, CST6CDT, MST7MDT, PST8PDT | Always |
sender_id | $oid object | The unique ID representing the registered number that should be used for the caller id. | 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 Text Message",
"text_message": "This is a test message."
},
"contact_group": {
"type": "upload",
"name_index": 1,
"phone_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": "Unique id representing the resource."
}
},
"description": "The unique ID representing the registered number resource."
},
"client_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "Unique id representing the resource."
}
},
"description": "Your client ID."
},
"contact_group_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "Unique id representing the resource."
}
},
"description": "The unique ID representing this resource."
},
"message_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "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 window in UTC in which the text can be attempted."
},
"timezone": {
"type": "string",
"enum": [
"EST5EDT",
"CST6CDT",
"MST7MDT",
"PST8PDT"
],
"description": "Indicates the timezone of the text start window."
},
"sender_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "Unique id representing the resource."
}
},
"description": "The unique ID representing the registered number that should be used for the sender id."
},
"created_on": {
"type": "string",
"description": "The date and time in UTC on which this resource was created."
},
"modified_on": {
"type": "string",
"description": "The date and time in UTC on which this resource was modified."
},
"status": {
"type": "string",
"description": "Indicates the status of the campaign."
}
}
}
Detail Operations ¶
Get OneGET/text/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": "Unique id representing the resource."
}
},
"description": "The unique ID representing the registered number resource."
},
"client_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "Unique id representing the resource."
}
},
"description": "Your client ID."
},
"contact_group_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "Unique id representing the resource."
}
},
"description": "The unique ID representing this resource."
},
"message_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "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 window in UTC in which the text can be attempted."
},
"timezone": {
"type": "string",
"enum": [
"EST5EDT",
"CST6CDT",
"MST7MDT",
"PST8PDT"
],
"description": "Indicates the timezone of the text start window."
},
"sender_id": {
"type": "object",
"properties": {
"$oid": {
"type": "string",
"description": "Unique id representing the resource."
}
},
"description": "The unique ID representing the registered number that should be used for the sender id."
},
"created_on": {
"type": "string",
"description": "The date and time in UTC on which this resource was created."
},
"modified_on": {
"type": "string",
"description": "The date and time in UTC on which this resource was modified."
},
"status": {
"type": "string",
"description": "Indicates the status of the campaign."
}
}
}
404
Headers
Content-Type: application/json
UpdatePUT/text/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