ICTCore REST APIs Guide
Overview
-
API Endpoint : Domain / web url corresponding address for ictcore/wwwroot installation directory.
-
API Access : Any valid combination of username and password created in usr table.
-
POST Method: Any data submitted to POST method based APIs must be encoded as json.
-
DELETE Method: user can use both DELETE and GET methods for delete APIs.
-
List APIs: All list APIs support optional search filter, to search user need to use search parameters in url as query string using key value pair.
HTTP Response Code
-
200 Function successfully executed.
-
401 Invalid or missing username or password.
-
403 Permission denied. User is not permitted to perform requested action.
-
404 Invalid API location or request to none existing resource. Check the URL and posting method (GET/POST).
-
412 Data validation failed.
-
417 Unexpected error.
-
423 System is not ready to perform requested action.
-
500 Internal server error. Try again at a later time.
-
501 Feature not implemented.
Authentication ¶
Authentication ¶
Create and return authentication token / session key.
Authentication parameterPOST/authentication
Note: Unlike other APIs this API does not require separate authentication in header
Example URI
Headers
Content-Type: application/json
Body
{
"username": "admin",
"passowrd": "mysecret"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"username": {
"type": "string",
"description": "api username for authentication"
},
"passowrd": {
"type": "string",
"description": "api password for authentication"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"token": "token"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"token": {
"type": "string"
}
}
}
System Statistics ¶
System Statistics ¶
Get system statistics, like total and active campaigns, total contacts, total number of calls made etc
Get System StatisticsGET/statistics
Example URI
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"campaign_total": 1,
"campaign_active": 0,
"group_total": 12,
"contact_total": 5,
"transmission_total": 1,
"transmission_active": 1,
"spool_total": 1,
"spool_success": 1,
"spool_failed": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"campaign_total": {
"type": "number",
"description": "total number of campaign"
},
"campaign_active": {
"type": "number",
"description": "total number of active campaign"
},
"group_total": {
"type": "number",
"description": "number of groups"
},
"contact_total": {
"type": "number",
"description": "number of contacts"
},
"transmission_total": {
"type": "number",
"description": "number of transmistions"
},
"transmission_active": {
"type": "number",
"description": "number of active transmission"
},
"spool_total": {
"type": "number",
"description": "number of spools"
},
"spool_success": {
"type": "number",
"description": "number of success spools"
},
"spool_failed": {
"type": "number",
"description": "number of unsuccessed spools"
}
}
}
Contact ¶
Collection of Contacts ¶
Create New ContactPOST/contacts
Example URI
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"first_name": "first name",
"last_name": "last name",
"phone": 3001234567,
"email": "email",
"address": "address",
"custom1": "custom1",
"custom2": "custom 2",
"custom3": "custom 3",
"description": "description"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone": {
"type": "number"
},
"email": {
"type": "string"
},
"address": {
"type": "string"
},
"custom1": {
"type": "string"
},
"custom2": {
"type": "string"
},
"custom3": {
"type": "string"
},
"description": {
"type": "string"
}
},
"required": [
"first_name",
"phone"
]
}
200
Headers
Content-Type: application/json
Body
{
"contact_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"contact_id": {
"type": "number",
"description": "id of recently created contact"
}
}
}
Get All ContactsGET/contacts
Example URI
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
[
{
"first_name": "first name",
"last_name": "last name",
"phone": 3001234567,
"email": "email",
"address": "address",
"custom1": "custom1",
"custom2": "custom 2",
"custom3": "custom 3",
"description": "description"
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
Single Contact ¶
View a Contact DetailGET/contacts/{contact_id}
Example URI
- contact_id
number
(required)ID of the contact in the form of an integer
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"first_name": "first name",
"last_name": "last name",
"phone": 3001234567,
"email": "email",
"address": "address",
"custom1": "custom1",
"custom2": "custom 2",
"custom3": "custom 3",
"description": "description"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone": {
"type": "number"
},
"email": {
"type": "string"
},
"address": {
"type": "string"
},
"custom1": {
"type": "string"
},
"custom2": {
"type": "string"
},
"custom3": {
"type": "string"
},
"description": {
"type": "string"
}
},
"required": [
"first_name",
"phone"
]
}
Update ContactsPUT/contacts/{contact_id}
Example URI
- contact_id
number
(required)ID of the contact in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"first_name": "first name",
"last_name": "last name",
"phone": 3001234567,
"email": "email",
"address": "address",
"custom1": "custom1",
"custom2": "custom 2",
"custom3": "custom 3",
"description": "description"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone": {
"type": "number"
},
"email": {
"type": "string"
},
"address": {
"type": "string"
},
"custom1": {
"type": "string"
},
"custom2": {
"type": "string"
},
"custom3": {
"type": "string"
},
"description": {
"type": "string"
}
},
"required": [
"first_name",
"phone"
]
}
200
Headers
Content-Type: application/json
Body
{
"first_name": "first name",
"last_name": "last name",
"phone": 3001234567,
"email": "email",
"address": "address",
"custom1": "custom1",
"custom2": "custom 2",
"custom3": "custom 3",
"description": "description"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone": {
"type": "number"
},
"email": {
"type": "string"
},
"address": {
"type": "string"
},
"custom1": {
"type": "string"
},
"custom2": {
"type": "string"
},
"custom3": {
"type": "string"
},
"description": {
"type": "string"
}
},
"required": [
"first_name",
"phone"
]
}
Delete ContactDELETE/contacts/{contact_id}
Example URI
- contact_id
number
(required)ID of the contact in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Contact association with group ¶
Create associationPUT/contacts/{contact_id}/link/{group_id}
Example URI
- contact_id
number
(required)ID of the contact in the form of an integer
- group_id
number
(required)ID of the group in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"first_name": "first name",
"last_name": "last name",
"phone": 3001234567,
"email": "email",
"address": "address",
"custom1": "custom1",
"custom2": "custom 2",
"custom3": "custom 3",
"description": "description"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone": {
"type": "number"
},
"email": {
"type": "string"
},
"address": {
"type": "string"
},
"custom1": {
"type": "string"
},
"custom2": {
"type": "string"
},
"custom3": {
"type": "string"
},
"description": {
"type": "string"
}
},
"required": [
"first_name",
"phone"
]
}
Delete associationDELETE/contacts/{contact_id}/link/{group_id}
remove selected contact from provided contact group
Example URI
- contact_id
number
(required)ID of the contact in the form of an integer
- group_id
number
(required)ID of the group in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"first_name": "first name",
"last_name": "last name",
"phone": 3001234567,
"email": "email",
"address": "address",
"custom1": "custom1",
"custom2": "custom 2",
"custom3": "custom 3",
"description": "description"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone": {
"type": "number"
},
"email": {
"type": "string"
},
"address": {
"type": "string"
},
"custom1": {
"type": "string"
},
"custom2": {
"type": "string"
},
"custom3": {
"type": "string"
},
"description": {
"type": "string"
}
},
"required": [
"first_name",
"phone"
]
}
Contact Group ¶
Collection of Groups ¶
Create New GroupPOST/groups
Example URI
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"id": 1,
"name": "group name",
"description": "Description"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "id is auto increment",
"default": 1
},
"name": {
"type": "string"
},
"description": {
"type": "string"
}
},
"required": [
"name"
]
}
200
Headers
Content-Type: application/json
Body
{
"group_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"group_id": {
"type": "number",
"description": "return newly created id"
}
}
}
Get All GroupsGET/groups
Example URI
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
[
{
"id": 1,
"name": "group name",
"description": "Description"
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
Single Group ¶
View a Group DetailGET/groups/{group_id}
Example URI
- group_id
number
(required)ID of the group in the form of an integer
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"id": 1,
"name": "group name",
"description": "Description"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "id is auto increment",
"default": 1
},
"name": {
"type": "string"
},
"description": {
"type": "string"
}
},
"required": [
"name"
]
}
Update GroupsPUT/groups/{group_id}
Example URI
- group_id
number
(required)ID of the group in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"id": 1,
"name": "group name",
"description": "Description"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "id is auto increment",
"default": 1
},
"name": {
"type": "string"
},
"description": {
"type": "string"
}
},
"required": [
"name"
]
}
200
Headers
Content-Type: application/json
Body
{
"id": 1,
"name": "group name",
"description": "Description"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "id is auto increment",
"default": 1
},
"name": {
"type": "string"
},
"description": {
"type": "string"
}
},
"required": [
"name"
]
}
Delete GroupDELETE/groups/{group_id}
Example URI
- group_id
number
(required)ID of the group in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
Group's Contacts collection ¶
Get all Contacts from GroupGET/groups/{group_id}/contacts
Example URI
- group_id
number
(required)ID of the group in the form of an integer
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
[
{
"first_name": "first name",
"last_name": "last name",
"phone": 3001234567,
"email": "email",
"address": "address",
"custom1": "custom1",
"custom2": "custom 2",
"custom3": "custom 3",
"description": "description"
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
CSV Contact Import / Export for Group ¶
Import Contacts into GroupPOST/groups/{group_id}/csv
Example URI
- group_id
number
(required)ID of the group in the form of an integer
Headers
Content-Type: text/csv
Authentication: Bearer JWT
Body
"CSV file contents"
200
Export Contacts from GroupGET/groups/{group_id}/csv
Download complete contacts from selected contact group as csv file
Example URI
- group_id
number
(required)ID of the group in the form of an integer
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: text/csv
Body
"CSV file contents"
Message ¶
There are different kinds of messages like fax,voice,sms and email
Fax Documents ¶
Create New DocumentPOST/messages/documents
Example URI
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"name": "group name",
"description": "Description"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
}
},
"required": [
"name"
]
}
200
Headers
Content-Type: application/json
Body
{
"document_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"document_id": {
"type": "number",
"description": "document id of recently created document record"
}
}
}
Get all DocumnetsGET/messages/documents
Example URI
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
[
{
"name": "group name",
"description": "Description",
"type": "type"
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
Single Document ¶
Note: Media / document can be downloaded separately using GET messages/documents/{document_id}/media
View a Document DetailGET/messages/documents/{document_id}
Example URI
- document_id
number
(required)ID of the document in the form of an integer
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"name": "group name",
"description": "Description",
"type": "type"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"type": {
"type": "string",
"description": "three digit file extension representing file type"
}
},
"required": [
"name"
]
}
Update DocumentPUT/messages/documents/{document_id}
Example URI
- document_id
number
(required)ID of the document in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"name": "group name",
"description": "Description",
"type": "type"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"type": {
"type": "string",
"description": "three digit file extension representing file type"
}
},
"required": [
"name"
]
}
200
Headers
Content-Type: application/json
Body
{
"name": "group name",
"description": "Description",
"type": "type"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"type": {
"type": "string",
"description": "three digit file extension representing file type"
}
},
"required": [
"name"
]
}
Delete DocumentDELETE/messages/documents/{document_id}
Example URI
- document_id
number
(required)ID of the document in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
Add Document File ¶
Add / Update Document filePUT/messages/documents/{document_id}/media
Upload media / pdf file for an existing document, this method should be called followed by POST messages/documents
Example URI
- document_id
number
(required)ID of the document in the form of an integer
Headers
Content-Type: application/pdf
Authentication: Bearer JWT
Body
"Pdf file contents"
200
Headers
Content-Type: application/json
Body
{
"document_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"document_id": {
"type": "number",
"description": "document id of updated record"
}
}
}
Get DocumentGET/messages/documents/{document_id}/media
Download Documen file
Example URI
- document_id
number
(required)ID of the document in the form of an integer
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/pdf
Body
"Pdf file contents"
Voice Recordings ¶
Collection of Voice Recordings ¶
Create New RecordingPOST/messages/recordings
Example URI
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"name": "group name",
"description": "Description",
"type": "type"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"type": {
"type": "string",
"description": "three digit file extension representing file type"
}
},
"required": [
"name"
]
}
200
Headers
Content-Type: application/json
Body
{
"recording_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"recording_id": {
"type": "number",
"description": "recording id of recently created recording"
}
}
}
Get all RecordingGET/messages/recordings
Note: Media / recording can be downloaded separately using GET messages/recording/{recording_id}/media
Example URI
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
[
{
"name": "group name",
"description": "Description",
"type": "type"
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
Single Recording ¶
View a Recording DetailGET/messages/recordings/{recording_id}
Example URI
- recording_id
number
(required)ID of the recording in the form of an integer
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"name": "group name",
"description": "Description",
"type": "type"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"type": {
"type": "string",
"description": "three digit file extension representing file type"
}
},
"required": [
"name"
]
}
Update RecordingPUT/messages/recordings/{recording_id}
Example URI
- recording_id
number
(required)ID of the recording in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"name": "group name",
"description": "Description",
"type": "type"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"type": {
"type": "string",
"description": "three digit file extension representing file type"
}
},
"required": [
"name"
]
}
200
Headers
Content-Type: application/json
Body
{
"name": "group name",
"description": "Description",
"type": "type"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"type": {
"type": "string",
"description": "three digit file extension representing file type"
}
},
"required": [
"name"
]
}
Delete RecordingDELETE/messages/recordings/{recording_id}
Example URI
- recording_id
number
(required)ID of the recording in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
Add Recording File ¶
Add / Update Recoridng FilePUT/messages/recordings/{recording_id}/media
Upload media / wav file for an existing recording, this method should be called followed by POST messages/recording
Example URI
- recording_id
number
(required)ID of the recording in the form of an integer
Headers
Content-Type: audio/wav
Authentication: Bearer JWT
Body
"Recording file contents"
200
Headers
Content-Type: application/json
Body
{
"recording_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"recording_id": {
"type": "number",
"description": "recording id of updated record"
}
}
}
Get RecordingGET/messages/recordings/{recording_id}/media
Download wav file
Example URI
- recording_id
number
(required)ID of the recording in the form of an integer
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: audio/wav
Body
"Recording file contents"
Email templates ¶
Collection of Email Templates ¶
Create New TemplatePOST/messages/templates
Example URI
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"name": "name",
"description": "Description",
"subject": "Subject",
"body": "body",
"body_alt": "body alt",
"type": "upload file"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"subject": {
"type": "string"
},
"body": {
"type": "string",
"description": "HTML Message"
},
"body_alt": {
"type": "string",
"description": "Plain Message"
},
"type": {
"type": "string",
"description": "three digit file extension representing file type"
}
},
"required": [
"name",
"subject",
"body"
]
}
200
Headers
Content-Type: application/json
Body
{
"template_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"template_id": {
"type": "number",
"description": "template id of recently created template"
}
}
}
Get all TemplatesGET/messages/templates
Note: Media / attachment can be downloaded separately using GET messages/templates/{template_id}/media
Example URI
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
[
{
"name": "name",
"description": "Description",
"subject": "Subject",
"body": "body",
"body_alt": "body alt",
"type": "upload file"
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
Single Template ¶
View a Template DetailGET/messages/templates/{template_id}
Example URI
- template_id
number
(required)ID of the template in the form of an integer
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"name": "name",
"description": "Description",
"subject": "Subject",
"body": "body",
"body_alt": "body alt",
"type": "upload file"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"subject": {
"type": "string"
},
"body": {
"type": "string",
"description": "HTML Message"
},
"body_alt": {
"type": "string",
"description": "Plain Message"
},
"type": {
"type": "string",
"description": "three digit file extension representing file type"
}
},
"required": [
"name",
"subject",
"body"
]
}
Update TemplatePUT/messages/templates/{template_id}
Example URI
- template_id
number
(required)ID of the template in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"name": "name",
"description": "Description",
"subject": "Subject",
"body": "body",
"body_alt": "body alt",
"type": "upload file"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"subject": {
"type": "string"
},
"body": {
"type": "string",
"description": "HTML Message"
},
"body_alt": {
"type": "string",
"description": "Plain Message"
},
"type": {
"type": "string",
"description": "three digit file extension representing file type"
}
},
"required": [
"name",
"subject",
"body"
]
}
200
Headers
Content-Type: application/json
Body
{
"name": "name",
"description": "Description",
"subject": "Subject",
"body": "body",
"body_alt": "body alt",
"type": "upload file"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"subject": {
"type": "string"
},
"body": {
"type": "string",
"description": "HTML Message"
},
"body_alt": {
"type": "string",
"description": "Plain Message"
},
"type": {
"type": "string",
"description": "three digit file extension representing file type"
}
},
"required": [
"name",
"subject",
"body"
]
}
Delete TemplateDELETE/messages/templates/{template_id}
Example URI
- template_id
number
(required)ID of the template in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
Add Template File ¶
Add / Update Template FilePUT/messages/templates/{template_id}/media
Upload media / attachment for an existing template, this method should be called followed by POST messages/templates
Example URI
- template_id
number
(required)ID of the template in the form of an integer
Headers
Content-Type: text/plain
Authentication: Bearer JWT
Body
"Email template contents"
200
Headers
Content-Type: application/json
Body
{
"template_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"template_id": {
"type": "number",
"description": "template id of updated record"
}
}
}
Get Template fileGET/messages/templates/{template_id}/media
Download file
Example URI
- template_id
number
(required)ID of the template in the form of an integer
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: text/html
Body
"Email template contents"
SMS Text Message ¶
Collection of SMS Text Messages ¶
Create New TextsPOST/messages/texts
Example URI
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"name": "name",
"data": "Data",
"type": "type",
"description": "Description"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"data": {
"type": "string",
"description": "Actual message"
},
"type": {
"type": "string",
"description": "unicode or plain or binary"
},
"description": {
"type": "string"
}
},
"required": [
"name",
"data"
]
}
200
Headers
Content-Type: application/json
Body
{
"text_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"text_id": {
"type": "number",
"description": "text id of recently created template"
}
}
}
Get all Text MessagesGET/messages/texts
Example URI
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
[
{
"name": "name",
"data": "Data",
"type": "type",
"description": "Description"
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
Single Text ¶
View a Text DetailGET/messages/texts/{text_id}
Example URI
- text_id
number
(required)ID of the text in the form of an integer
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"name": "name",
"data": "Data",
"type": "type",
"description": "Description"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"data": {
"type": "string",
"description": "Actual message"
},
"type": {
"type": "string",
"description": "unicode or plain or binary"
},
"description": {
"type": "string"
}
},
"required": [
"name",
"data"
]
}
Update TextPUT/messages/texts/{text_id}
Example URI
- text_id
number
(required)ID of the text in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"name": "name",
"data": "Data",
"type": "type",
"description": "Description"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"data": {
"type": "string",
"description": "Actual message"
},
"type": {
"type": "string",
"description": "unicode or plain or binary"
},
"description": {
"type": "string"
}
},
"required": [
"name",
"data"
]
}
200
Headers
Content-Type: application/json
Body
{
"name": "name",
"data": "Data",
"type": "type",
"description": "Description"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"data": {
"type": "string",
"description": "Actual message"
},
"type": {
"type": "string",
"description": "unicode or plain or binary"
},
"description": {
"type": "string"
}
},
"required": [
"name",
"data"
]
}
Delete TextDELETE/messages/texts/{text_id}
Example URI
- text_id
number
(required)ID of the text in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
Program ¶
Single Program ¶
View a Program DetailGET/programs/{program_id}
Example URI
- program_id
number
(required)ID of the program in the form of an integer
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"name": "name",
"type": "type",
"parent_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string",
"description": "program type"
},
"parent_id": {
"type": "number",
"description": "program id of parent program"
}
},
"required": [
"name"
]
}
Delete ProgramDELETE/programs/{program_id}
Example URI
- program_id
number
(required)ID of the program in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
Shortcut way to create new Transmissions ¶
New TransmissionPUT/programs/{program_id}/transmissions
Example URI
- program_id
number
(required)ID of the program in the form of an Intiger
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"title": "title",
"origin": "origin",
"contact_id": 1,
"account_id": 1,
"service_flag: 1 (number) - Type of transmission service i.e Email::SERVICE_FLAG or Voice": ":SERVICE_FLAG",
"program_id": 1,
"direction": "direction",
"status": "status",
"response": "response"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"title": {
"type": "string"
},
"origin": {
"type": "string",
"description": "reference to function / program which is responsible creation of this transmission"
},
"contact_id": {
"type": "number",
"description": "contact id to contact where to transmit message"
},
"account_id": {
"type": "number",
"description": "account id of associated account"
},
"service_flag: 1 (number) - Type of transmission service i.e Email::SERVICE_FLAG or Voice": {
"type": "string"
},
"program_id": {
"type": "number",
"description": "program id of program which will be used with this transmission"
},
"direction": {
"type": "string",
"description": "either can be outbound or inbound"
},
"status": {
"type": "string",
"description": "if complete or failed"
},
"response": {
"type": "string",
"description": "the cause of error, transmission failure"
}
},
"required": [
"contact_id",
"program_id"
]
}
200
Headers
Content-Type: application/json
Body
{
"transmission_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"transmission_id": {
"type": "number",
"description": "transmission id of recently created transmission"
}
}
}
Get TransmistionGET/programs/{program_id}/transmissions
Example URI
- program_id
number
(required)ID of the program in the form of an Intiger
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"title": "title",
"origin": "origin",
"contact_id": 1,
"account_id": 1,
"service_flag: 1 (number) - Type of transmission service i.e Email::SERVICE_FLAG or Voice": ":SERVICE_FLAG",
"program_id": 1,
"direction": "direction",
"status": "status",
"response": "response"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"title": {
"type": "string"
},
"origin": {
"type": "string",
"description": "reference to function / program which is responsible creation of this transmission"
},
"contact_id": {
"type": "number",
"description": "contact id to contact where to transmit message"
},
"account_id": {
"type": "number",
"description": "account id of associated account"
},
"service_flag: 1 (number) - Type of transmission service i.e Email::SERVICE_FLAG or Voice": {
"type": "string"
},
"program_id": {
"type": "number",
"description": "program id of program which will be used with this transmission"
},
"direction": {
"type": "string",
"description": "either can be outbound or inbound"
},
"status": {
"type": "string",
"description": "if complete or failed"
},
"response": {
"type": "string",
"description": "the cause of error, transmission failure"
}
},
"required": [
"contact_id",
"program_id"
]
}
Email to Fax program ¶
Email to Fax program ¶
Create New Email to Fax programPOST/programs/emailtofax
Example URI
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"name": "name",
"type": "type",
"parent_id": 1,
"account_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string",
"description": "program type"
},
"parent_id": {
"type": "number",
"description": "program id of parent program"
},
"account_id": {
"type": "number",
"description": "account id of account for which this program is being created"
}
},
"required": [
"name"
]
}
200
Headers
Content-Type: application/json
Body
{
"program_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"program_id": {
"type": "number",
"description": "program id of recently created program"
}
}
}
Fax to Email program ¶
Fax to Email program ¶
Create New Fax to Email programPOST/programs/faxtoemail
Example URI
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"name": "name",
"type": "type",
"parent_id": 1,
"account_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string",
"description": "program type"
},
"parent_id": {
"type": "number",
"description": "program id of parent program"
},
"account_id": {
"type": "number",
"description": "account id of account for which this program is being created"
}
},
"required": [
"name"
]
}
200
Headers
Content-Type: application/json
Body
{
"program_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"program_id": {
"type": "number",
"description": "program id of recently created program"
}
}
}
Receive Email program ¶
Receive Email program ¶
Create New Receive Email programPOST/programs/receiveemail
Example URI
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"name": "name",
"type": "type",
"parent_id": 1,
"account_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string",
"description": "program type"
},
"parent_id": {
"type": "number",
"description": "program id of parent program"
},
"account_id": {
"type": "number",
"description": "account id of account for which this program is being created"
}
},
"required": [
"name"
]
}
200
Headers
Content-Type: application/json
Body
{
"program_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"program_id": {
"type": "number",
"description": "program id of recently created program"
}
}
}
Receive FAX program ¶
Receive FAX program ¶
Create New Receive FAX programPOST/programs/receivefax
Example URI
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"name": "name",
"type": "type",
"parent_id": 1,
"account_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string",
"description": "program type"
},
"parent_id": {
"type": "number",
"description": "program id of parent program"
},
"account_id": {
"type": "number",
"description": "account id of account for which this program is being created"
}
},
"required": [
"name"
]
}
200
Headers
Content-Type: application/json
Body
{
"program_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"program_id": {
"type": "number",
"description": "program id of recently created program"
}
}
}
Receive SMS program ¶
Receive SMS program ¶
Create New Receive SMS programPOST/programs/receivesms
Example URI
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"name": "name",
"type": "type",
"parent_id": 1,
"account_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string",
"description": "program type"
},
"parent_id": {
"type": "number",
"description": "program id of parent program"
},
"account_id": {
"type": "number",
"description": "account id of account for which this program is being created"
}
},
"required": [
"name"
]
}
200
Headers
Content-Type: application/json
Body
{
"program_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"program_id": {
"type": "number",
"description": "program id of recently created program"
}
}
}
Send Email program ¶
Send Email program ¶
Create New Send Email programPOST/programs/sendemail
Example URI
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"name": "name",
"type": "type",
"parent_id": 1,
"template_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string",
"description": "program type"
},
"parent_id": {
"type": "number",
"description": "program id of parent program"
},
"template_id": {
"type": "number",
"description": "template id of email template for which this program is being created"
}
},
"required": [
"name"
]
}
200
Headers
Content-Type: application/json
Body
{
"program_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"program_id": {
"type": "number",
"description": "program id of recently created program"
}
}
}
Send FAX program ¶
Send FAX program ¶
Prepare given fax document for provided account, and make it ready to be sent
Create New Send FAX programPOST/programs/sendfax
Example URI
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"name": "name",
"type": "type",
"parent_id": 1,
"document_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string",
"description": "program type"
},
"parent_id": {
"type": "number",
"description": "program id of parent program"
},
"document_id": {
"type": "number",
"description": "document id of fax document for which this program is being created"
}
},
"required": [
"name"
]
}
200
Headers
Content-Type: application/json
Body
{
"program_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"program_id": {
"type": "number",
"description": "program id of recently created program"
}
}
}
Send SMS program ¶
Send SMS program ¶
Prepare given SMS for provided account, and make it ready to be sent
Create New Send SMS programPOST/programs/sendsms
Example URI
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"name": "name",
"type": "type",
"parent_id": 1,
"text_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string",
"description": "program type"
},
"parent_id": {
"type": "number",
"description": "program id of parent program"
},
"text_id": {
"type": "number",
"description": "text id of SMS text for which this program is being created"
}
},
"required": [
"name"
]
}
200
Headers
Content-Type: application/json
Body
{
"program_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"program_id": {
"type": "number",
"description": "program id of recently created program"
}
}
}
Voice Call with pre recorded message ¶
Voice Message program ¶
Prepare given voice recording for provided account, and make it ready to be played during call
Create New Voice Message programPOST/programs/voicemessage
Example URI
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"name": "name",
"type": "type",
"parent_id": 1,
"recording_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string",
"description": "program type"
},
"parent_id": {
"type": "number",
"description": "program id of parent program"
},
"recording_id": {
"type": "number",
"description": "recording id of voice recording for which this program is being created"
}
},
"required": [
"name"
]
}
200
Headers
Content-Type: application/json
Body
{
"program_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"program_id": {
"type": "number",
"description": "program id of recently created program"
}
}
}
Transmission - the actual call or action ¶
create call request / dial / send message
Collection of Transmission ¶
Create New TransmissionPOST/transmissions
Example URI
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"title": "title",
"origin": "origin",
"contact_id": 1,
"account_id": 1,
"service_flag: 1 (number) - Type of transmission service i.e Email::SERVICE_FLAG or Voice": ":SERVICE_FLAG",
"program_id": 1,
"direction": "direction",
"status": "status",
"response": "response"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"title": {
"type": "string"
},
"origin": {
"type": "string",
"description": "reference to function / program which is responsible creation of this transmission"
},
"contact_id": {
"type": "number",
"description": "contact id to contact where to transmit message"
},
"account_id": {
"type": "number",
"description": "account id of associated account"
},
"service_flag: 1 (number) - Type of transmission service i.e Email::SERVICE_FLAG or Voice": {
"type": "string"
},
"program_id": {
"type": "number",
"description": "program id of program which will be used with this transmission"
},
"direction": {
"type": "string",
"description": "either can be outbound or inbound"
},
"status": {
"type": "string",
"description": "if complete or failed"
},
"response": {
"type": "string",
"description": "the cause of error, transmission failure"
}
},
"required": [
"contact_id",
"program_id"
]
}
200
Headers
Content-Type: application/json
Body
{
"text_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"text_id": {
"type": "number",
"description": "text id of recently created template"
}
}
}
Get all TransmissionsGET/transmissions
Example URI
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"title": "title",
"origin": "origin",
"contact_id": 1,
"account_id": 1,
"service_flag: 1 (number) - Type of transmission service i.e Email::SERVICE_FLAG or Voice": ":SERVICE_FLAG",
"program_id": 1,
"direction": "direction",
"status": "status",
"response": "response"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"title": {
"type": "string"
},
"origin": {
"type": "string",
"description": "reference to function / program which is responsible creation of this transmission"
},
"contact_id": {
"type": "number",
"description": "contact id to contact where to transmit message"
},
"account_id": {
"type": "number",
"description": "account id of associated account"
},
"service_flag: 1 (number) - Type of transmission service i.e Email::SERVICE_FLAG or Voice": {
"type": "string"
},
"program_id": {
"type": "number",
"description": "program id of program which will be used with this transmission"
},
"direction": {
"type": "string",
"description": "either can be outbound or inbound"
},
"status": {
"type": "string",
"description": "if complete or failed"
},
"response": {
"type": "string",
"description": "the cause of error, transmission failure"
}
},
"required": [
"contact_id",
"program_id"
]
}
Transmition Send ¶
Send TransmitionPOST/transmissions/{transmission_id}/send
Example URI
- transmission_id
number
(required)ID of the transmission in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"spool_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"spool_id": {
"type": "number",
"description": "Spool ID of resulted attempt"
}
}
}
Transmition Retry ¶
Retry TransmitionPOST/transmissions/{transmission_id}/retry
Example URI
- transmission_id
number
(required)ID of the transmission in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"spool_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"spool_id": {
"type": "number",
"description": "Spool ID of resulted attempt"
}
}
}
Transmission Schdule ¶
Schdule TransmissionPUT/transmissions/{transmission_id}/schedule
Instead of delivering message instantly, schedule its delivery in near future.
Example URI
- transmission_id
number
(required)ID of the transmission in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"schedule_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"schedule_id": {
"type": "number",
"description": "schedule id of recently created schedule record"
}
}
}
Delete TextDELETE/transmissions/{transmission_id}/schedule
Example URI
- transmission_id
number
(required)ID of the transmission in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
Transmission Clone ¶
Get Transmission CloneGET/transmissions/{transmission_id}/clone
Want to resend an already completed transmission, copy it (Note: after copying, client still need to request send method for message delivery)
Example URI
- transmission_id
number
(required)ID of the transmission in the form of an integer
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"transmission_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"transmission_id": {
"type": "number",
"description": "transmission id of newly created transmission"
}
}
}
single Transmission ¶
Get a TransmissionGET/transmissions/{transmission_id}
Example URI
- transmission_id
number
(required)ID of the transmission in the form of an integer
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"title": "title",
"origin": "origin",
"contact_id": 1,
"account_id": 1,
"service_flag: 1 (number) - Type of transmission service i.e Email::SERVICE_FLAG or Voice": ":SERVICE_FLAG",
"program_id": 1,
"direction": "direction",
"status": "status",
"response": "response"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"title": {
"type": "string"
},
"origin": {
"type": "string",
"description": "reference to function / program which is responsible creation of this transmission"
},
"contact_id": {
"type": "number",
"description": "contact id to contact where to transmit message"
},
"account_id": {
"type": "number",
"description": "account id of associated account"
},
"service_flag: 1 (number) - Type of transmission service i.e Email::SERVICE_FLAG or Voice": {
"type": "string"
},
"program_id": {
"type": "number",
"description": "program id of program which will be used with this transmission"
},
"direction": {
"type": "string",
"description": "either can be outbound or inbound"
},
"status": {
"type": "string",
"description": "if complete or failed"
},
"response": {
"type": "string",
"description": "the cause of error, transmission failure"
}
},
"required": [
"contact_id",
"program_id"
]
}
Campaign - the actual bulk system ¶
Create campaign for message delivery / calling bulk contacts
Campaign collection ¶
Create New CampaignPOST/campaigns
Example URI
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"program_id": 1,
"group_id": 2,
"delay": 2,
"try_allowed": 2,
"account_id: 1 (number) - account_id of associated account": "Hello, world!",
"status": "active"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"program_id": {
"type": "number"
},
"group_id": {
"type": "number"
},
"delay": {
"type": "number",
"description": "pause between transmissions `milliseconds`"
},
"try_allowed": {
"type": "number"
},
"account_id: 1 (number) - account_id of associated account": {
"type": "string"
},
"status": {
"type": "string",
"description": "current status of campaign"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"campaign_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"campaign_id": {
"type": "number",
"description": "campaign id of recently created campaign record"
}
}
}
Get all CampaignGET/campaigns
Example URI
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
[
{
"program_id": 1,
"group_id": 2,
"delay": 2,
"try_allowed": 2,
"account_id: 1 (number) - account_id of associated account": "Hello, world!",
"status": "active"
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
Single Campaign Action ¶
Update CampaignPUT/campaigns/{campaign_id}
Example URI
- campaign_id
number
(required)ID of the campaign in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"program_id": 1,
"group_id": 2,
"delay": 2,
"try_allowed": 2,
"account_id: 1 (number) - account_id of associated account": "Hello, world!",
"status": "active"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"program_id": {
"type": "number"
},
"group_id": {
"type": "number"
},
"delay": {
"type": "number",
"description": "pause between transmissions `milliseconds`"
},
"try_allowed": {
"type": "number"
},
"account_id: 1 (number) - account_id of associated account": {
"type": "string"
},
"status": {
"type": "string",
"description": "current status of campaign"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"program_id": 1,
"group_id": 2,
"delay": 2,
"try_allowed": 2,
"account_id: 1 (number) - account_id of associated account": "Hello, world!",
"status": "active"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"program_id": {
"type": "number"
},
"group_id": {
"type": "number"
},
"delay": {
"type": "number",
"description": "pause between transmissions `milliseconds`"
},
"try_allowed": {
"type": "number"
},
"account_id: 1 (number) - account_id of associated account": {
"type": "string"
},
"status": {
"type": "string",
"description": "current status of campaign"
}
}
}
Get a CampaignGET/campaigns/{campaign_id}
Example URI
- campaign_id
number
(required)ID of the campaign in the form of an integer
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"program_id": 1,
"group_id": 2,
"delay": 2,
"try_allowed": 2,
"account_id: 1 (number) - account_id of associated account": "Hello, world!",
"status": "active"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"program_id": {
"type": "number"
},
"group_id": {
"type": "number"
},
"delay": {
"type": "number",
"description": "pause between transmissions `milliseconds`"
},
"try_allowed": {
"type": "number"
},
"account_id: 1 (number) - account_id of associated account": {
"type": "string"
},
"status": {
"type": "string",
"description": "current status of campaign"
}
}
}
Delete CampaignDELETE/campaigns/{campaign_id}
Example URI
- campaign_id
number
(required)ID of the campaign in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
Campaign Start ¶
Campaign StartPUT/campaigns/{campaign_id}/start
Start contact processing / calling in selected campaign
Example URI
- campaign_id
number
(required)ID of the campaign in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"Boolean": "true on success"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"Boolean": {
"type": "string",
"description": "Boolean: true on success"
}
}
}
Campaign Stop ¶
Campaign StopPUT/campaigns/{campaign_id}/stop
Stop contact processing / calling in selected campaign
Example URI
- campaign_id
number
(required)ID of the campaign in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"Boolean": "true on success"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"Boolean": {
"type": "string",
"description": "Boolean: true on success"
}
}
}
Campaign schedule ¶
Start Campaign SchedulePOST/campaigns/{campaign_id}/start/schedule
Instead of processing campaign contacts instantly, schedule their processing / calling in near future.
Example URI
- campaign_id
number
(required)ID of the campaign in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"schedule_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"schedule_id": {
"type": "number",
"description": "schedule id of recently created schedule record"
}
}
}
Campaign schedule ¶
Stop Campaign SchedulePOST/campaigns/{campaign_id}/stop/schedule
Instead manually stopping a campaign, we can schedule it.
Example URI
- campaign_id
number
(required)ID of the campaign in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"schedule_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"schedule_id": {
"type": "number",
"description": "schedule id of recently created schedule record"
}
}
}
Delete Campaign schedule ¶
Stop Campaign SchedulePOST/campaigns/{campaign_id}/schedule
Cancel any schedule associated with given campaign
Example URI
- campaign_id
number
(required)ID of the campaign in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
Reports ¶
Get Transmission Status Report ¶
Transmission StatusGET/transmissions/{transmission_id}/status
Get current status of an existing transmission
Example URI
- transmission_id
number
(required)ID of the transmission in the form of an integer
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"Status": "status"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"Status": {
"type": "string",
"description": "Will return one of the following status (pending, processing, completed, failed, invalid)"
}
}
}
Get Transmission detail Report ¶
Transmission DetailGET/transmissions/{transmission_id}/detail
A list of attempts (spool) with their detail, which system has made to deliver that transmission
Example URI
- transmission_id
number
(required)ID of the transmission in the form of an integer
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
[
{
"spool_id": 1,
"time_spool": 1518705479,
"time_start": 1518705479,
"time_connect": 1518705479,
"time_end": 1518705479,
"status": "completed",
"response": "busy",
"transmission_id": 1
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
Get Transmission result Report ¶
Transmission ResultGET/transmissions/{transmission_id}/result
Complete details of each step along with remote side responses, for requested transmission
Example URI
- transmission_id
number
(required)ID of the transmission in the form of an integer
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
[
{
"spool_result_id": 1,
"spool_id": 1,
"type": "dtmf",
"name": "age",
"data": "22"
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
Get Spool result status ¶
Spool StatusGET/spools/{spool_id}/status
Get current status of an existing transmission attempt (spool)
Example URI
- spool_id
number
(required)ID of the spool in the form of an integer
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"status": "status"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "Will return one of the following status (initiated, completed, failed)"
}
}
}
Get Spool result result ¶
Spool ResultGET/spools/{spool_id}/result
Complete details of each step along with remote side responses, for requested transmission attempt spool_id
Example URI
- spool_id
number
(required)ID of the spool in the form of an integer
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
[
{
"spool_result_id": 1,
"spool_id": 1,
"type": "dtmf",
"name": "age",
"data": "22"
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
User account / Email / DID / Extension ¶
Users Acounts ¶
Create AccountPOST/accounts
Example URI
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"username": "username",
"passwd": "password",
"passwd_pin": "password pin",
"first_name": "first name",
"last_name": "last name",
"phone": 3001234567,
"email": "email",
"address": "address",
"active": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"username": {
"type": "string"
},
"passwd": {
"type": "string"
},
"passwd_pin": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone": {
"type": "number"
},
"email": {
"type": "string"
},
"address": {
"type": "string"
},
"active": {
"type": "number",
"description": "1 for active, 0 for disabled"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"account_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"account_id": {
"type": "number",
"description": "account id of recently created account record"
}
}
}
Get All AccountsGET/accounts
Example URI
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
[
{
"username": "username",
"passwd": "password",
"passwd_pin": "password pin",
"first_name": "first name",
"last_name": "last name",
"phone": 3001234567,
"email": "email",
"address": "address",
"active": 1
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
Single Account Detail ¶
View a AccountGET/accounts/{account_id}
Read / view complete account data
Example URI
- account_id
number
(required)ID of the account in the form of an integer
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"username": "username",
"passwd": "password",
"passwd_pin": "password pin",
"first_name": "first name",
"last_name": "last name",
"phone": 3001234567,
"email": "email",
"address": "address",
"active": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"username": {
"type": "string"
},
"passwd": {
"type": "string"
},
"passwd_pin": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone": {
"type": "number"
},
"email": {
"type": "string"
},
"address": {
"type": "string"
},
"active": {
"type": "number",
"description": "1 for active, 0 for disabled"
}
}
}
Update AccountPUT/accounts/{account_id}
Update an existing account
Example URI
- account_id
number
(required)ID of the account in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"username": "username",
"passwd": "password",
"passwd_pin": "password pin",
"first_name": "first name",
"last_name": "last name",
"phone": 3001234567,
"email": "email",
"address": "address",
"active": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"username": {
"type": "string"
},
"passwd": {
"type": "string"
},
"passwd_pin": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone": {
"type": "number"
},
"email": {
"type": "string"
},
"address": {
"type": "string"
},
"active": {
"type": "number",
"description": "1 for active, 0 for disabled"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"username": "username",
"passwd": "password",
"passwd_pin": "password pin",
"first_name": "first name",
"last_name": "last name",
"phone": 3001234567,
"email": "email",
"address": "address",
"active": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"username": {
"type": "string"
},
"passwd": {
"type": "string"
},
"passwd_pin": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone": {
"type": "number"
},
"email": {
"type": "string"
},
"address": {
"type": "string"
},
"active": {
"type": "number",
"description": "1 for active, 0 for disabled"
}
}
}
Delete AccountDELETE/accounts/{account_id}
Delete an existing account
Example URI
- account_id
number
(required)ID of the account in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
Subscribe an account to some exiting program ¶
Subscribe an account to some exiting programPUT/accounts/{account_id}/programs/{program_id}
Example URI
- account_id
number
(required)ID of the account in the form of an integer
- program_id
number
(required)ID of the program in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"username": "username",
"passwd": "password",
"passwd_pin": "password pin",
"first_name": "first name",
"last_name": "last name",
"phone": 3001234567,
"email": "email",
"address": "address",
"active": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"username": {
"type": "string"
},
"passwd": {
"type": "string"
},
"passwd_pin": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone": {
"type": "number"
},
"email": {
"type": "string"
},
"address": {
"type": "string"
},
"active": {
"type": "number",
"description": "1 for active, 0 for disabled"
}
}
}
Unsubscribe an account from given programDELETE/accounts/{account_id}/programs/{program_id}
Example URI
- account_id
number
(required)ID of the account in the form of an integer
- program_id
number
(required)ID of the program in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"username": "username",
"passwd": "password",
"passwd_pin": "password pin",
"first_name": "first name",
"last_name": "last name",
"phone": 3001234567,
"email": "email",
"address": "address",
"active": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"username": {
"type": "string"
},
"passwd": {
"type": "string"
},
"passwd_pin": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone": {
"type": "number"
},
"email": {
"type": "string"
},
"address": {
"type": "string"
},
"active": {
"type": "number",
"description": "1 for active, 0 for disabled"
}
}
}
Clear an account from all subscribed programs ¶
Clear an account all subscribed programDELETE/accounts/{account_id}/programs
Example URI
- account_id
number
(required)ID of the account in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"username": "username",
"passwd": "password",
"passwd_pin": "password pin",
"first_name": "first name",
"last_name": "last name",
"phone": 3001234567,
"email": "email",
"address": "address",
"active": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"username": {
"type": "string"
},
"passwd": {
"type": "string"
},
"passwd_pin": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone": {
"type": "number"
},
"email": {
"type": "string"
},
"address": {
"type": "string"
},
"active": {
"type": "number",
"description": "1 for active, 0 for disabled"
}
}
}
Change account ownership ¶
Change account ownership assign account to some other userPUT/accounts/{account_id}/users/{user_id}
Example URI
- account_id
number
(required)ID of the account in the form of an integer
- user_id
number
(required)ID of the user in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"username": "username",
"passwd": "password",
"passwd_pin": "password pin",
"first_name": "first name",
"last_name": "last name",
"phone": 3001234567,
"email": "email",
"address": "address",
"active": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"username": {
"type": "string"
},
"passwd": {
"type": "string"
},
"passwd_pin": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone": {
"type": "number"
},
"email": {
"type": "string"
},
"address": {
"type": "string"
},
"active": {
"type": "number",
"description": "1 for active, 0 for disabled"
}
}
}
Dissociate a account from any user ¶
Dissociate a account from any user, make it free to assignDELETE/accounts/{account_id}/users
Example URI
- account_id
number
(required)ID of the account in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"username": "username",
"passwd": "password",
"passwd_pin": "password pin",
"first_name": "first name",
"last_name": "last name",
"phone": 3001234567,
"email": "email",
"address": "address",
"active": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"username": {
"type": "string"
},
"passwd": {
"type": "string"
},
"passwd_pin": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone": {
"type": "number"
},
"email": {
"type": "string"
},
"address": {
"type": "string"
},
"active": {
"type": "number",
"description": "1 for active, 0 for disabled"
}
}
}
User Management ¶
User Collection ¶
Create New UserPOST/users
Example URI
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"username": "username",
"passwd": "password",
"first_name": "first name",
"last_name": "last name",
"phone": 3001234567,
"email": "email",
"address": "address",
"company": "company name",
"country_id": 1,
"timezone_id": 1,
"active": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"username": {
"type": "string"
},
"passwd": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone": {
"type": "number"
},
"email": {
"type": "string"
},
"address": {
"type": "string"
},
"company": {
"type": "string"
},
"country_id": {
"type": "number",
"description": "see country table"
},
"timezone_id": {
"type": "number",
"description": "see timezone table"
},
"active": {
"type": "number",
"description": "1 for active, 0 for disabled"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"user_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"user_id": {
"type": "number",
"description": "user id of recently created user record"
}
}
}
Get All UsersGET/users
list all exiting users, optionally client can filter users using query string (key value pair) in url, while using any of following fields
Example URI
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
[
{
"username": "username",
"passwd": "password",
"first_name": "first name",
"last_name": "last name",
"phone": 3001234567,
"email": "email",
"address": "address",
"company": "company name",
"country_id": 1,
"timezone_id": 1,
"active": 1
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
Single User Detail ¶
View a User DetailGET/users/{user_id}
Example URI
- user_id
number
(required)ID of the user in the form of an integer
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"username": "username",
"passwd": "password",
"first_name": "first name",
"last_name": "last name",
"phone": 3001234567,
"email": "email",
"address": "address",
"company": "company name",
"country_id": 1,
"timezone_id": 1,
"active": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"username": {
"type": "string"
},
"passwd": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone": {
"type": "number"
},
"email": {
"type": "string"
},
"address": {
"type": "string"
},
"company": {
"type": "string"
},
"country_id": {
"type": "number",
"description": "see country table"
},
"timezone_id": {
"type": "number",
"description": "see timezone table"
},
"active": {
"type": "number",
"description": "1 for active, 0 for disabled"
}
}
}
Update UserPUT/users/{user_id}
Example URI
- user_id
number
(required)ID of the user in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"username": "username",
"passwd": "password",
"first_name": "first name",
"last_name": "last name",
"phone": 3001234567,
"email": "email",
"address": "address",
"company": "company name",
"country_id": 1,
"timezone_id": 1,
"active": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"username": {
"type": "string"
},
"passwd": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone": {
"type": "number"
},
"email": {
"type": "string"
},
"address": {
"type": "string"
},
"company": {
"type": "string"
},
"country_id": {
"type": "number",
"description": "see country table"
},
"timezone_id": {
"type": "number",
"description": "see timezone table"
},
"active": {
"type": "number",
"description": "1 for active, 0 for disabled"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"username": "username",
"passwd": "password",
"first_name": "first name",
"last_name": "last name",
"phone": 3001234567,
"email": "email",
"address": "address",
"company": "company name",
"country_id": 1,
"timezone_id": 1,
"active": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"username": {
"type": "string"
},
"passwd": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone": {
"type": "number"
},
"email": {
"type": "string"
},
"address": {
"type": "string"
},
"company": {
"type": "string"
},
"country_id": {
"type": "number",
"description": "see country table"
},
"timezone_id": {
"type": "number",
"description": "see timezone table"
},
"active": {
"type": "number",
"description": "1 for active, 0 for disabled"
}
}
}
Delete UserDELETE/users/{user_id}
Example URI
- user_id
number
(required)ID of the user in the form of an integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
User Role Define ¶
Update User RolePUT/users/{user_id}/roles/{role_id}
Example URI
- user_id
number
(required)ID of the user in the form of an Integer
- role_id
number
(required)ID of the role in the form of an Integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"username": "username",
"passwd": "password",
"first_name": "first name",
"last_name": "last name",
"phone": 3001234567,
"email": "email",
"address": "address",
"company": "company name",
"country_id": 1,
"timezone_id": 1,
"active": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"username": {
"type": "string"
},
"passwd": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone": {
"type": "number"
},
"email": {
"type": "string"
},
"address": {
"type": "string"
},
"company": {
"type": "string"
},
"country_id": {
"type": "number",
"description": "see country table"
},
"timezone_id": {
"type": "number",
"description": "see timezone table"
},
"active": {
"type": "number",
"description": "1 for active, 0 for disabled"
}
}
}
Delete User RoleDELETE/users/{user_id}/roles/{role_id}
Example URI
- user_id
number
(required)ID of the user in the form of an Integer
- role_id
number
(required)ID of the role in the form of an Integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
User permissions Define ¶
Update User PermissionsPUT/users/{user_id}/permissions/{permission_id}
Example URI
- user_id
number
(required)ID of the user in the form of an Integer
- permission_id
number
(required)ID of the permission in the form of an Integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"username": "username",
"passwd": "password",
"first_name": "first name",
"last_name": "last name",
"phone": 3001234567,
"email": "email",
"address": "address",
"company": "company name",
"country_id": 1,
"timezone_id": 1,
"active": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"username": {
"type": "string"
},
"passwd": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone": {
"type": "number"
},
"email": {
"type": "string"
},
"address": {
"type": "string"
},
"company": {
"type": "string"
},
"country_id": {
"type": "number",
"description": "see country table"
},
"timezone_id": {
"type": "number",
"description": "see timezone table"
},
"active": {
"type": "number",
"description": "1 for active, 0 for disabled"
}
}
}
Delete User PermissionsDELETE/users/{user_id}/permissions/{permission_id}
Example URI
- user_id
number
(required)ID of the user in the form of an Integer
- permission_id
number
(required)ID of the permission in the form of an Integer
Headers
Content-Type: application/json
Authentication: Bearer JWT
200
Trunk / Termination Providers APIs ¶
Trunk Termination ¶
Create ProviderPOST/providers
Example URI
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"name": "name",
"gateway_flag: 1 (number) - Type of gateway i.e Freeswitch::GATEWAY_FLAG or Kannel": ":GATEWAY_FLAG",
"service_flag: 1 (number) - Type of transmission service i.e Email::SERVICE_FLAG or Voice": ":SERVICE_FLAG",
"node_id": 1,
"host": "ipaddress",
"port": 8080,
"username": "username",
"password": "password",
"dialstring": "dailstring",
"prefix": 12,
"settings": "settings",
"register": 1,
"weight": 10,
"type": "type",
"active": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"gateway_flag: 1 (number) - Type of gateway i.e Freeswitch::GATEWAY_FLAG or Kannel": {
"type": "string"
},
"service_flag: 1 (number) - Type of transmission service i.e Email::SERVICE_FLAG or Voice": {
"type": "string"
},
"node_id": {
"type": "number",
"description": "see node table"
},
"host": {
"type": "string",
"description": "ip address to termination server"
},
"port": {
"type": "number"
},
"username": {
"type": "string"
},
"password": {
"type": "string"
},
"dialstring": {
"type": "string"
},
"prefix": {
"type": "number",
"description": "number which is required to be dialed before actual phone number"
},
"settings": {
"type": "string",
"description": "any additional configuration required by this provider"
},
"register": {
"type": "number"
},
"weight": {
"type": "number"
},
"type": {
"type": "string"
},
"active": {
"type": "number"
}
},
"required": [
"username"
]
}
200
Headers
Content-Type: application/json
Body
{
"provider_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"provider_id": {
"type": "number",
"description": "provider id of recently created provider record"
}
}
}
Get All ProvidersGET/providers
Example URI
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
[
{
"name": "name",
"gateway_flag: 1 (number) - Type of gateway i.e Freeswitch::GATEWAY_FLAG or Kannel": ":GATEWAY_FLAG",
"service_flag: 1 (number) - Type of transmission service i.e Email::SERVICE_FLAG or Voice": ":SERVICE_FLAG",
"node_id": 1,
"host": "ipaddress",
"port": 8080,
"username": "username",
"password": "password",
"dialstring": "dailstring",
"prefix": 12,
"settings": "settings",
"register": 1,
"weight": 10,
"type": "type",
"active": 1
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
Single Provider Action ¶
Update ProviderPUT/providers/
Example URI
Headers
Content-Type: application/json
Authentication: Bearer JWT
Body
{
"name": "name",
"gateway_flag: 1 (number) - Type of gateway i.e Freeswitch::GATEWAY_FLAG or Kannel": ":GATEWAY_FLAG",
"service_flag: 1 (number) - Type of transmission service i.e Email::SERVICE_FLAG or Voice": ":SERVICE_FLAG",
"node_id": 1,
"host": "ipaddress",
"port": 8080,
"username": "username",
"password": "password",
"dialstring": "dailstring",
"prefix": 12,
"settings": "settings",
"register": 1,
"weight": 10,
"type": "type",
"active": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"gateway_flag: 1 (number) - Type of gateway i.e Freeswitch::GATEWAY_FLAG or Kannel": {
"type": "string"
},
"service_flag: 1 (number) - Type of transmission service i.e Email::SERVICE_FLAG or Voice": {
"type": "string"
},
"node_id": {
"type": "number",
"description": "see node table"
},
"host": {
"type": "string",
"description": "ip address to termination server"
},
"port": {
"type": "number"
},
"username": {
"type": "string"
},
"password": {
"type": "string"
},
"dialstring": {
"type": "string"
},
"prefix": {
"type": "number",
"description": "number which is required to be dialed before actual phone number"
},
"settings": {
"type": "string",
"description": "any additional configuration required by this provider"
},
"register": {
"type": "number"
},
"weight": {
"type": "number"
},
"type": {
"type": "string"
},
"active": {
"type": "number"
}
},
"required": [
"username"
]
}
200
Headers
Content-Type: application/json
Body
{
"name": "name",
"gateway_flag: 1 (number) - Type of gateway i.e Freeswitch::GATEWAY_FLAG or Kannel": ":GATEWAY_FLAG",
"service_flag: 1 (number) - Type of transmission service i.e Email::SERVICE_FLAG or Voice": ":SERVICE_FLAG",
"node_id": 1,
"host": "ipaddress",
"port": 8080,
"username": "username",
"password": "password",
"dialstring": "dailstring",
"prefix": 12,
"settings": "settings",
"register": 1,
"weight": 10,
"type": "type",
"active": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"gateway_flag: 1 (number) - Type of gateway i.e Freeswitch::GATEWAY_FLAG or Kannel": {
"type": "string"
},
"service_flag: 1 (number) - Type of transmission service i.e Email::SERVICE_FLAG or Voice": {
"type": "string"
},
"node_id": {
"type": "number",
"description": "see node table"
},
"host": {
"type": "string",
"description": "ip address to termination server"
},
"port": {
"type": "number"
},
"username": {
"type": "string"
},
"password": {
"type": "string"
},
"dialstring": {
"type": "string"
},
"prefix": {
"type": "number",
"description": "number which is required to be dialed before actual phone number"
},
"settings": {
"type": "string",
"description": "any additional configuration required by this provider"
},
"register": {
"type": "number"
},
"weight": {
"type": "number"
},
"type": {
"type": "string"
},
"active": {
"type": "number"
}
},
"required": [
"username"
]
}
View a Provider DetailGET/providers/
Example URI
Headers
Authentication: Bearer JWT
200
Headers
Content-Type: application/json
Body
{
"name": "name",
"gateway_flag: 1 (number) - Type of gateway i.e Freeswitch::GATEWAY_FLAG or Kannel": ":GATEWAY_FLAG",
"service_flag: 1 (number) - Type of transmission service i.e Email::SERVICE_FLAG or Voice": ":SERVICE_FLAG",
"node_id": 1,
"host": "ipaddress",
"port": 8080,
"username": "username",
"password": "password",
"dialstring": "dailstring",
"prefix": 12,
"settings": "settings",
"register": 1,
"weight": 10,
"type": "type",
"active": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"gateway_flag: 1 (number) - Type of gateway i.e Freeswitch::GATEWAY_FLAG or Kannel": {
"type": "string"
},
"service_flag: 1 (number) - Type of transmission service i.e Email::SERVICE_FLAG or Voice": {
"type": "string"
},
"node_id": {
"type": "number",
"description": "see node table"
},
"host": {
"type": "string",
"description": "ip address to termination server"
},
"port": {
"type": "number"
},
"username": {
"type": "string"
},
"password": {
"type": "string"
},
"dialstring": {
"type": "string"
},
"prefix": {
"type": "number",
"description": "number which is required to be dialed before actual phone number"
},
"settings": {
"type": "string",
"description": "any additional configuration required by this provider"
},
"register": {
"type": "number"
},
"weight": {
"type": "number"
},
"type": {
"type": "string"
},
"active": {
"type": "number"
}
},
"required": [
"username"
]
}
Delete ProvidersDELETE/providers/
Example URI
Headers
Content-Type: application/json
Authentication: Bearer JWT
200