The Initiate Call API facilitates click-to-dial functionality.
In order to access this API method, please ensure you have correctly set permissions for the relevant API Key. See Creating a new API Key
Base URI and Endpoint
Base URI: https://myapi.maxo.com.au/
Endpoint: calls/initiate
Permissions Required
Account Functions/Click to Call
Note: This function works for Hosted PBX Extensions only
Example
The API example below is called via standard HTTP GET request, however all parameters can be posted or included in a JSON array.
https://myapi.maxo.com.au/calls/initiate/?key=[key]&origin=[extension number]&destination=[to number]&autoAnswer=1
Supported Parameters
Attribute | Supported Values | Required | Notes |
key | The API key from My Account Portal | Yes | |
origin | Hosted PBX Extension Number | Yes | The calling extension (eg 101) |
destination | A valid phone number | Yes | |
autoAnswer | 0 1 | No | Automatically dials the number on the calling extension, providing a seamless click-to-call experience |
Successful Response
A successful request to the API will result in a HTTP 200 response, with a json object containing status:1 and callstatus:queued
Successful Response - Result
For JSON The following parameters are returned
Field | Description |
callstatus | Must be "queued" to indicate that the request was successful |
Unsuccessful Response
An unsuccessful request to the API will result in a HTTP response other than a 200 OK, and json with status:0.
Examples of unsuccessful HTTP codes include 401 Unauthorised, 404 Invalid method, a 400 Bad Request/Incomplete request, or 403 Forbidden if the supplied key has insufficient permissions for the method or resource.
An example of a failed request where the calling extension was not connected:
As further functionality becomes available, full permissions, functions, and API descriptions will be available in our upcoming developer portal.
For further assistance with any API CDR related queries, please reach out to MaxoTel support.