How to Add/Edit/Delete Extensions or Contacts using the HTTP API

Add a title here for this section

Title Call Control Manager API
Base URL https://x5.1xx.xxx.x4:8000/api.aspx
Method POST
URL Parameter qsSecuritykey=25sdfs482s4Rsdfasxt45wersf
qsValue= Json Array
Json Array (Request Format) { “mExtension”:[{“FirstName”: “xxxxx”, “LastName”: “xxxx”, “PhoneNumber”: “xxxx”, “CompanyName”: “xxxxxx”}] }
Success Response Format {“status”:”Extension Created”, “errorMessage”:””, “errorCode”:””}
Error Response Format {“message”:”Authentication Token invalid”, “errorCode”:”INVALID_AUTH_ID”}
Post Request Format:

Send to POST url ( https://x5.1xx.xxx.x4:8000/api.aspx?action=addExt&qstype=1&qsValue={………} & qsSecuritykey=25sdfs482s4Rsdfasxt45wersf ) with two request parameters: 

qsValue Either a single JSON event object or an array of JSON objects, each of which represents one event.
qsSecuritykey If Security key value matched with your external application. The POST method will proceed with request

Adding a Single Extension

ExtentionNumber The unique Extension number (Required)
EmailAddress Email Address of the user (Optional)
FirstName First name of the user (Required)
LastName Last Name of the user (Optional)
OutboundCallerID Outbound Caller ID of the user (Optional)
HTTP POST URL (Request Format):

https://x5.1xx.xxx.x4:8000/api.aspx?action=addExt&qstype=1&qsSecuritykey=25sdfs482s4Rsdfasxt45wersf &qsValue= 
{ 
sExtension”: 
[ {“ExtentionNumber”:”xxxx”, “EmailAddress”:””, “FirstName”: ” xxxx “, “LastName”: “”, “OutboundCallerID”: “”} 
] 
} 

Response Format:

If Success – {“status”:”Extension Created”, “errorMessage”:””, “errorCode”:””} 

If Fail – {“message”:”Authentication Token invalid”, “errorCode”:”INVALID_AUTH_ID”} 
{“message”:”Internal Server error”, “errorCode”:”500″} 
{“message”:”Exception Detail”, “errorCode”:”WEBSERVICE_ERROR”} 

Adding Multiple Extensions

ExtentionNumber The unique Extension number (Required)
EmailAddress Email Address of the user (Optional)
FirstName First name of the user (Required)
LastName Last Name of the user (Optional)
OutboundCallerID Outbound Caller ID of the user (Optional)
HTTP POST URL (Request Format):

https://x5.1xx.xxx.x4:8000/api.aspx?action=addExt&qstype=1&qsSecuritykey=25sdfs482s4Rsdfasxt45wersf&qsValue= 

{ 
“mExtension”: 
[ {“ExtentionNumber”:”xxxx”, “EmailAddress”:””, “FirstName”: ” xxxx “, “LastName”: “”, “OutboundCallerID”: “”}, {“ExtentionNumber”:”xxxx”, “EmailAddress”:””, “FirstName”: ” xxxx “, “LastName”: “”, “OutboundCallerID”: “”} 
] 
} 

Response Format:

If Success – {“status”:”All Extension Created”, “errorMessage”:””, “errorCode”:””} 

If Fail – {“message”:”Authentication Token invalid”, “errorCode”:”INVALID_AUTH_ID”} 

{“message”:”Internal Server error”, “errorCode”:”500″} 

{“message”:”Exception Detail”, “errorCode”:” WEBSERVICE_ERROR “} 

Deleting an Extension

ExtentionNumber The unique Extension number (Required)
HTTP POST URL (Request Format):
Response Format:

If Success – {“status”:”Extension Deleted”, “errorMessage”:””, “errorCode”:””} 

If Fail – {“message”:”Authentication Token invalid”, “errorCode”:”INVALID_AUTH_ID”} 

{“message”:”Internal Server error”, “errorCode”:”500″} 

{“message”:”* Exception Detail”, “errorCode”:” WEBSERVICE_ERROR “} 

*Note: Exception Detail response error like (e.g: Extension number does not exit). 

Updating an Extension

Note: Extension number is a fixed value and it cannot be changed. 
ExtentionNumber The unique Extension number (Required)
EmailAddress Email Address of the user (Optional)
FirstName First name of the user (Required)
LastName Last Name of the user (Optional)
OutboundCallerID Outbound Caller ID of the user (Optional)
HTTP POST URL (Request Format):

https://x5.1xx.xxx.x4:8000/api.aspx?action=updateExt&qstype=1&qsSecuritykey=25sdfs482s4Rsdfasxt45wersf &qsValue= 

{ 
“uExtension”: 
[ {“ExtentionNumber”:”xxxx”, “EmailAddress”:””, “FirstName”: ” xxxx “, “LastName”: “”, “OutboundCallerID”: “”} 
] 
} 

Response Format:

If Success – {“status”:”Extension Updated”, “errorMessage”:””, “errorCode”:””} 

If Fail – {“message”:”Authentication Token invalid”, “errorCode”:”INVALID_AUTH_ID”} 

{“message”:”Internal Server error”, “errorCode”:”500″} 

{“message”:”Exception Detail”, “errorCode”:”WEBSERVICE_ERROR”} 

Adding a Contact

FirstName First Name of the contact person (Required)
LastName Last Name of the contact person (Required)
PhoneNumber Phone Number of the contact person (Required)
CompanyName Company Name of the contact person
HTTP POST URL (Request Format):

https://x5.1xx.xxx.x4:8000/api.aspx?action=addPhonebook&qstype=1&qsSecuritykey=25sdfs482s4Rsdfasxt45wersf &qsValue= 

{ 
“sContact”: 
[ {“FirstName”: “xxxxx”, “LastName”: “xxxx”, “PhoneNumber”: “xxxx”, “CompanyName”: “”} 
] 
} 

Response Format:

If Success – {“status”:”Contact Created”, “errorMessage”:””, “errorCode”:””} 

If Fail – {“message”:”Authentication Token invalid”, “errorCode”:”INVALID_AUTH_ID”} 

{“message”:”Internal Server error”, “errorCode”:”500″} 

{“message”:”Exception Detail”, “errorCode”:” WEBSERVICE_ERROR “} 

Updating a Contact

FirstName First Name of the contact person (Required)
LastName Last Name of the contact person (Required)
PhoneNumber Phone Number of the contact person (Required)
CompanyName Company Name of the contact person
PhoneNumber Phone Number of the contact person (Required)
Registered PhoneNumber Specific contact person Phone Number of the contact person (Required)
HTTP POST URL (Request Format):

https://x5.1xx.xxx.x4:8000/api.aspx?action=updatePhonebook&qstype=1&qsSecuritykey=25sdfs482s4Rsdfasxt45wersf &qsValue= 

{ 
“uContact”: 
[ {“FirstName”: “xxxx”, “LastName”: “xxxx”, “PhoneNumber”: “xxxx”, “CompanyName”: “”, “RegisteredPhoneNumber”: “xxxx”} 
] 
} 

Response Format:

If Success – {“status”:”Contact Updated”, “errorMessage”:””, “errorCode”:””} 

If Fail – {“message”:”Authentication Token invalid”, “errorCode”:”INVALID_AUTH_ID”} 

{“message”:”Internal Server error”, “errorCode”:”500″} 

{“message”:”Exception Detail”, “errorCode”:”WEBSERVICE_ERROR”} 

Deleting a Contact

PhoneNumber Phone Number of the contact person to delete the record (Required)
HTTP POST URL (Request Format):
Response Format:

If Success – {“status”:”Contact Deleted”, “errorMessage”:””, “errorCode”:””} 

If Fail – {“message”:”Authentication Token invalid”, “errorCode”:”INVALID_AUTH_ID”} 

{“message”:”Internal Server error”, “errorCode”:”500″} 

{“message”:”Exception Detail”, “errorCode”:”WEBSERVICE_ERROR”} 

Error Handling

– If Authentication token invalid: 

{“message”:”Authentication Token invalid”, “errorCode”:”INVALID_AUTH_ID”} 

– If Authentication token expired: 

{“message”:”Authentication Token expired”, “errorCode”:”AUTH_ID_EXPIRED”} 

– On Add Single Extension: 

{“message”:”Invalid Extension number”, “errorCode”:”INVALID_EXTENSION”} 
Note: If enter any empty value or illegal value(string) 

{“message”:”Extension number already exist”, “errorCode”:”EXTENSION_EXIST”} 

{“message”:”Invalid Email Address”, “errorCode”:”INVALID_EMAIL”} 
Note: Validate the global email format and this field is not a mandatory one 

{“message”:”Invalid First name”, “errorCode”:”FNAME_INVALID”} 
Note: If enter any empty values as First name 

– On Delete Extension 

{“message”:”Invalid Extension number”, “errorCode”:”INVALID_EXTENSION”} 
Note: If enter any empty values or extension not found 

– On Update Extension 

{“message”:”Invalid Extension number”, “errorCode”:”INVALID_EXTENSION”} 
Note: If enter any empty values or extension not found 

{“message”:”Invalid Email Address”, “errorCode”:”INVALID_EMAIL”} 
Note: Validate the global email format and this field is not a mandatory one 

– On Add New Contact 

{“message”:”Invalid First name”, “errorCode”:”FNAME_INVALID”} 
Note: If enter any empty values 

{“message”:”Invalid Last name”, “errorCode”:”LNAME_INVALID”} 
Note: If enter any empty values 

{“message”:”Invalid Phone Number”, “errorCode”:”PHONE_NUMBER_INVALID”} 
Note: If enter any empty values or illegal value(string) 

– On Update Contact 

{“message”:”Invalid First name”, “errorCode”:”FNAME_INVALID”} 
Note: If enter any empty values 

{“message”:”Invalid Last name”, “errorCode”:”LNAME_INVALID”} 
Note: If enter any empty values 

{“message”:”Invalid Phone Number”, “errorCode”:”PHONE_NUMBER_INVALID”} 
Note: If enter any empty values or illegal value(string) 

– Delete Contact 

{“message”:”Invalid Phone Number”, “errorCode”:”PHONE_NUMBER_INVALID”} 
Note: If enter any empty values or illegal value(string) 

Notes

  1. For every Add / Update Extension, an email will be sent to the appropriate email-id, as long as the email address is provided.
  2. When deleting an extension call recordings and voice mail recordings are automatically saved in ‘C’ drive ‘backup’ folder. 
  3. Upon adding, updating and deleting, the security key is checked and authenticated. 
  4. Save the security key, while POST the Request sends the security key as mentioned aboveThe system checks the security key and then sends the response. 
Scroll to Top