Get Transmission Status Report
Get Transmission detail Report
Get Transmission result Report

ICTFax 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.

Authenticate
Authentication

Create and return authentication token / session key.

Authenticate parameter

Note: Unlike other APIs this API does not require separate authentication in header

REQUEST

Headers
Content-Type application/json
application/json
                          {
  "username": "admin",
  "passowrd": "mysecret"
}
                        
                          {
  "$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"
    }
  }
}
                        

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "token": "token"
}
                      
                        {
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "token": {
      "type": "string"
    }
  }
}
                      
Program
General program related function

To create program please use respective APIs separately designed for each type of program.

REQUEST

Headers
Authentication Bearer JWT

RESPONSE

Headers
Content-Type application/json
200 application/json
                        [
  {
    "name": "name",
    "type": "type",
    "parent_id": 1
  }
]
                      
                        {
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
                      

REQUEST

Headers
Authentication Bearer JWT

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "name": "name",
  "type": "type",
  "parent_id": 1
}
                      
                        {
  "$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"
  ]
}
                      

REQUEST

Headers
Content-Type application/json
Authentication Bearer JWT
application/json
                          {
  "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": "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"
  ]
}
                        

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "transmission_id": 1
}
                      
                        {
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "transmission_id": {
      "type": "number",
      "description": "transmission id of recently created transmission"
    }
  }
}
                      

REQUEST

Headers
Authentication Bearer JWT

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "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": "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"
  ]
}
                      
Fax to Email program
Fax to Email program

Create New Fax to Email program

REQUEST

Headers
Content-Type application/json
Authentication Bearer JWT
application/json
                          {
  "name": "name",
  "type": "type",
  "parent_id": 1,
  "account_id": 1
}
                        
                          {
  "$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"
  ]
}
                        

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "program_id": 1
}
                      
                        {
  "$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 program

REQUEST

Headers
Content-Type application/json
Authentication Bearer JWT
application/json
                          {
  "name": "name",
  "type": "type",
  "parent_id": 1,
  "document_id": 1
}
                        
                          {
  "$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"
  ]
}
                        

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "program_id": 1
}
                      
                        {
  "$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 Transmission

REQUEST

Headers
Content-Type application/json
Authentication Bearer JWT
application/json
                          {
  "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": "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"
  ]
}
                        

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "text_id": 1
}
                      
                        {
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "text_id": {
      "type": "number",
      "description": "text id of recently created template"
    }
  }
}
                      

Get all Transmissions

REQUEST

Headers
Authentication Bearer JWT

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "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": "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"
  ]
}
                      
single Transmission

Get a Transmission

REQUEST

Parameters
transmission_id number

ID of the transmission in the form of an integer

Headers
Authentication Bearer JWT

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "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": "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"
  ]
}
                      

Delete Transmission

REQUEST

Parameters
transmission_id number

ID of the transmission in the form of an integer

Headers
Content-Type application/json
Authentication Bearer JWT

RESPONSE

Headers
Transmition Send

Send Transmition

REQUEST

Parameters
transmission_id number

ID of the transmission in the form of an integer

Headers
Content-Type application/json
Authentication Bearer JWT

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "spool_id": 1
}
                      
                        {
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "spool_id": {
      "type": "number",
      "description": "Spool ID of resulted attempt"
    }
  }
}
                      
Contact
Collection of Contacts

Create New Contact

REQUEST

Headers
Content-Type application/json
Authentication Bearer JWT
application/json
                          {
  "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": "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"
  ]
}
                        

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "contact_id": 1
}
                      
                        {
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "contact_id": {
      "type": "number",
      "description": "id of recently created contact"
    }
  }
}
                      

Get All Contacts

REQUEST

Headers
Authentication Bearer JWT

RESPONSE

Headers
Content-Type application/json
200 application/json
                        [
  {
    "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": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
                      
Single Contact

View a Contact Detail

REQUEST

Parameters
contact_id number

ID of the contact in the form of an integer

Headers
Authentication Bearer JWT

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "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": "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 Contacts

REQUEST

Parameters
contact_id number

ID of the contact in the form of an integer

Headers
Content-Type application/json
Authentication Bearer JWT
application/json
                          {
  "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": "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"
  ]
}
                        

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "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": "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 Contact

REQUEST

Parameters
contact_id number

ID of the contact in the form of an integer

Headers
Content-Type application/json
Authentication Bearer JWT

RESPONSE

Headers
Content-Type application/json
Message

There are different kinds of messages like fax,voice,sms and email

Fax Documents

Create New Document

REQUEST

Headers
Content-Type application/json
Authentication Bearer JWT
application/json
                          {
  "name": "group name",
  "description": "Description"
}
                        
                          {
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    }
  },
  "required": [
    "name"
  ]
}
                        

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "document_id": 1
}
                      
                        {
  "$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 Documnets

REQUEST

Headers
Authentication Bearer JWT

RESPONSE

Headers
Content-Type application/json
200 application/json
                        [
  {
    "name": "group name",
    "description": "Description",
    "type": "type"
  }
]
                      
                        {
  "$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 Detail

REQUEST

Parameters
document_id number

ID of the document in the form of an integer

Headers
Authentication Bearer JWT

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "name": "group name",
  "description": "Description",
  "type": "type"
}
                      
                        {
  "$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 Document

REQUEST

Parameters
document_id number

ID of the document in the form of an integer

Headers
Content-Type application/json
Authentication Bearer JWT
application/json
                          {
  "name": "group name",
  "description": "Description",
  "type": "type"
}
                        
                          {
  "$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"
  ]
}
                        

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "name": "group name",
  "description": "Description",
  "type": "type"
}
                      
                        {
  "$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 Document

REQUEST

Parameters
document_id number

ID of the document in the form of an integer

Headers
Content-Type application/json
Authentication Bearer JWT

RESPONSE

Headers
Add Document File

Add / Update Document file

Upload media / pdf file for an existing document, this method should be called followed by POST messages/documents

REQUEST

Parameters
document_id number

ID of the document in the form of an integer

Headers
Content-Type application/pdf
Authentication Bearer JWT
application/pdf
                          "Pdf file contents"

                        
                          
                        

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "document_id": 1
}
                      
                        {
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "document_id": {
      "type": "number",
      "description": "document id of updated record"
    }
  }
}
                      

Get Document

Download Document file

REQUEST

Parameters
document_id number

ID of the document in the form of an integer

Headers
Authentication Bearer JWT

RESPONSE

Headers
Content-Type application/pdf
200 application/pdf
                        "Pdf file contents"

                      
                        
                      
Reports
Get Transmission Status Report

Transmission Status

Get current status of an existing transmission

REQUEST

Parameters
transmission_id number

ID of the transmission in the form of an integer

Headers
Authentication Bearer JWT

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "Status": "status"
}
                      
                        {
  "$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 Detail

A list of attempts (spool) with their detail, which system has made to deliver that transmission

REQUEST

Parameters
transmission_id number

ID of the transmission in the form of an integer

Headers
Authentication Bearer JWT

RESPONSE

Headers
Content-Type application/json
200 application/json
                        [
  {
    "spool_id": 1,
    "time_spool": 1518705479,
    "time_start": 1518705479,
    "time_connect": 1518705479,
    "time_end": 1518705479,
    "status": "completed",
    "response": "busy",
    "transmission_id": 1
  }
]
                      
                        {
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
                      
Get Transmission result Report

Transmission Result

Complete details of each step along with remote side responses, for requested transmission

REQUEST

Parameters
transmission_id number

ID of the transmission in the form of an integer

Headers
Authentication Bearer JWT

RESPONSE

Headers
Content-Type application/json
200 application/json
                        [
  {
    "spool_result_id": 1,
    "spool_id": 1,
    "type": "dtmf",
    "name": "age",
    "data": "22"
  }
]
                      
                        {
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
                      
User account / Email / DID / Extension
Users Acounts

Create Account

REQUEST

Headers
Content-Type application/json
Authentication Bearer JWT
application/json
                          {
  "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": "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"
    }
  }
}
                        

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "account_id": 1
}
                      
                        {
  "$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 Accounts

REQUEST

Headers
Authentication Bearer JWT

RESPONSE

Headers
Content-Type application/json
200 application/json
                        [
  {
    "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": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
                      
Single Account Detail

View a Account

Read / view complete account data

REQUEST

Parameters
account_id number

ID of the account in the form of an integer

Headers
Authentication Bearer JWT

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "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": "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 Account

Update an existing account

REQUEST

Parameters
account_id number

ID of the account in the form of an integer

Headers
Content-Type application/json
Authentication Bearer JWT
application/json
                          {
  "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": "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"
    }
  }
}
                        

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "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": "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 Account

Delete an existing account

REQUEST

Parameters
account_id number

ID of the account in the form of an integer

Headers
Content-Type application/json
Authentication Bearer JWT

RESPONSE

Headers
Subscribe an account to some exiting program

Subscribe an account to some exiting program

REQUEST

Parameters
account_id number

ID of the account in the form of an integer

program_id number

ID of the program in the form of an integer

Headers
Content-Type application/json
Authentication Bearer JWT

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "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": "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 program

REQUEST

Parameters
account_id number

ID of the account in the form of an integer

program_id number

ID of the program in the form of an integer

Headers
Content-Type application/json
Authentication Bearer JWT

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "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": "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 program

REQUEST

Parameters
account_id number

ID of the account in the form of an integer

Headers
Content-Type application/json
Authentication Bearer JWT

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "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": "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 user

REQUEST

Parameters
account_id number

ID of the account in the form of an integer

user_id number

ID of the user in the form of an integer

Headers
Content-Type application/json
Authentication Bearer JWT

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "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": "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 assign

REQUEST

Parameters
account_id number

ID of the account in the form of an integer

Headers
Content-Type application/json
Authentication Bearer JWT

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "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": "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 User

REQUEST

Headers
Content-Type application/json
Authentication Bearer JWT
application/json
                          {
  "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": "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"
    }
  }
}
                        

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "user_id": 1
}
                      
                        {
  "$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 Users

list all exiting users, optionally client can filter users using query string (key value pair) in url, while using any of following fields

REQUEST

Headers
Authentication Bearer JWT

RESPONSE

Headers
Content-Type application/json
200 application/json
                        [
  {
    "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": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
                      
Single User Detail

View a User Detail

REQUEST

Parameters
user_id number

ID of the user in the form of an integer

Headers
Authentication Bearer JWT

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "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": "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 User

REQUEST

Parameters
user_id number

ID of the user in the form of an integer

Headers
Content-Type application/json
Authentication Bearer JWT
application/json
                          {
  "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": "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"
    }
  }
}
                        

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "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": "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

REQUEST

Parameters
user_id number

ID of the user in the form of an integer

Headers
Content-Type application/json
Authentication Bearer JWT

RESPONSE

Headers
Trunk / Termination Providers APIs
Trunk Termination

Create Provider

REQUEST

Headers
Content-Type application/json
Authentication Bearer JWT
application/json
                          {
  "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": "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"
  ]
}
                        

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "provider_id": 1
}
                      
                        {
  "$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 Providers

REQUEST

Headers
Authentication Bearer JWT

RESPONSE

Headers
Content-Type application/json
200 application/json
                        [
  {
    "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": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
                      
Single Provider Action

Update Provider

REQUEST

Parameters
provider_id number

ID of the user in the form of an integer

Headers
Content-Type application/json
Authentication Bearer JWT
application/json
                          {
  "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": "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"
  ]
}
                        

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "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": "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 Detail

REQUEST

Parameters
provider_id number

ID of the user in the form of an integer

Headers
Authentication Bearer JWT

RESPONSE

Headers
Content-Type application/json
200 application/json
                        {
  "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": "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 Providers

REQUEST

Parameters
provider_id number

ID of the user in the form of an integer

Headers
Content-Type application/json
Authentication Bearer JWT

RESPONSE

Headers