Basics
The Voximplant Management API provides control of Voximplant accounts and services. You can use it to integrate with service-side applications for the management of phone numbers, calling, messaging, billing, logs, call records, user access, and more. The Management API includes an HTTP interface and many client library options for the most popular programming languages for easy use.
The Control API allows you to:
- Start scenarios/conferences programmatically
- Control active VoxEngine sessions and exchange information with them
- Handle automated call campaigns by creating multiple JavaScript sessions in parallel
The Provisioning API allows you to:
- Create and edit Voximplant accounts, as well as child accounts
- Create and edit service accounts (including managing their permissions)
- Edit Voximplant applications, users, and rules
- Start execution of existing Voximplant scenarios
- Exchange data with active Voximplant sessions
The Phone Number API handles manipulations related to phone numbers, caller IDs, and SIP registrations, as follows:
- Purchase numbers, activate them, and bind them to applications
- Check if numbers support SMS; if so, enable receiving and sending SMS
- Manage SIP registrations
- Check call history or download it as CSV
When you download call history reports via the DownloadHistoryReport method, the file can be compressed (.gzip). If you use CURL for making requests, pass the --compressed
key with the request for CURL to process the compressed file correctly.
See the entire tree of methods in the API reference.
Examples
User management
The SDK needs to connect to the cloud and log in via Voximplant user credentials.
You can create users manually via the control panel or programmatically via the HTTP API.
Here are the methods to call via API to create/delete/get users, etc:
- AddUser – adds a new user.
- DelUser – deletes the specified user(s).
- GetUsers – shows the users of the specified account.
- SetUserInfo – edits the user.
- TransferMoneyToUser – transfers the account's money to the user or transfers the user's money to the account if the money amount is negative.
Here is an example of an addUser request (follow the method links to find the other requests):
Voximplant requires fully qualified credentials to select which application handles the call. A login attempt fails if the user is not assigned to the specified application in the Voximplant control panel.
This is how you should log in on the example of the Web SDK:
To manage ChildAccounts, read the ChildAccounts article.
Session management
You can start the Voximplant cloud's JavaScript session programmatically via the StartScenarios or StartConference methods that accept the Voximplant application rule identifier.
Find the rule identifier in the Routing section inside each particular application:
Given the account ID, API key, and rule ID, a request to start a new JavaScript scenario looks like this:
Scenarios started via the HTTP Management API can then initiate one or more outgoing calls; it is also possible to automate mass outgoing calls via the CreateCallList method that accepts a list of data items and creates multiple JavaScript sessions in parallel, passing individual data items to sessions so JavaScript code can initiate calls to the specified numbers and use other data to process such calls.
The media_session_access_url is returned in response to let the developer control the created session. When the developer makes an HTTP request to media_session_access_url, the AppEvents.HttpRequest event is triggered in the scenario. A developer can process it and return some data right away or use httpRequest to notify an external web service about some event that can happen later.
API clients
All modern languages let a developer make HTTP requests and handle HTTP responses, but now there is no need to create your own wrappers for our API, just use the API client libraries which ensure you are using the API in the best-supported manner. The API libraries speed up the development and let developers focus on the high-level aspects of their work instead of taking care of the low-level details of requests/responses.
Available libraries
Currently, we have the following libraries:
Usage
Although the API libraries differ from each other, some of the prerequisites are common for them. To use any of our libraries, you need the following:
A service account to grant access to Management API on behalf of your main account
Specific prerequisites along with usage nuances for each particular library are described in the corresponding GitHub README files.