Table of Contents

API Host URL

Sever API Host: https://api.enablex.io/voice/

Every major version release of Voice API will have a sub-directory named after major version number. This is known as Base URL for a Server API Version, e.g.

Version Base URL: https://api.enablex.io/voice/v1/

All Server API Routes are mapped to the Version Base URL, e.g.

Call Route URL: https://api.enablex.io/voice/v1/call

API Authentication

The Voice API uses HTTP Basic Authentication mechanism to authenticate API calls. Each API call is validated via the authentication header.

The following Information is used as credentials to access Voice API for your Application in the HTTP basic authentication header in the API call request

  • Application ID or APP_ID as username
  • Application Key or APP_KEY as Password
POST https://api.enablex.io/voice/v1/calls
Authorization: Basic XXXXXX    
Content-Type: application/json

The Authorization header in the above example contains a value XXXXX which is a base64 encoded string of the APP_ID:APP_KEY.

How to get APP_ID & APP_KEY

All API Credentials are paired to a Project. You will need to create a Project first to receive the API credentials. To create Project, follow the given steps:

  • Login to EnableX Portal
  • Navigate: {Main Menu} Projects / Create New Project

You must include Voice Service in the Project. Once your Project is created, you will receive an email with the Project’s Access Credentials, viz. APP_ID and APP_KEY.

API Responses

The Server API call  make use of  JSON Result Code to determine if the API call is successful.

Success JSON

Successful Server API calls will always return JSON with a 0 (zero) Result Code.

{    
     "result": 0,    
     ….
     ….
 }

Error JSON

If unsuccessful for whatever reason the Server API will return a JSON with a non—zero result code. An error response in  JSON will always carry 3 keys, viz. result code, error, description. See example below:

{    
     "result": "Non-Zero Result Code",   
     "error": "Short reason",
     "desc": "Descriptive information about the error / warning"
 }

Result Code Grouping

The Result Codes of Server API are grouped into 5 categories as shown in the table below

CodeCategoryDescription
1xxInformationRequest received & processed
2xxSuccessRequest received & accepted
3xxRedirectionAction required to complete Request
4xxClient ErrorIllegible Request Syntax. Can’t be fulfilled
5xxServer ErrorServer failed to complete a legit Request