For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Platform docsVideosCommunitySign up
CapabilitiesGetting startedVoice AI OrchestrationVoxEngine PlatformAPI ReferenceFAQ
CapabilitiesGetting startedVoice AI OrchestrationVoxEngine PlatformAPI ReferenceFAQ
  • VoxEngine Development
    • VoxEngine concepts
    • Applications
    • Users
    • Scenarios
    • Routing rules
    • Phone numbers
    • Calls and sessions
    • Video calls
    • Management API
    • Account subusers
    • Integrations
    • Firewall
    • Cloud IDE
    • Type declarations
    • VoxEngine CI
    • Working with API requests
    • Working with the Voximplant's API
    • Remote session management
    • Key-value storage
    • Secret storage
    • Custom data
    • Limits and restrictions
    • Scenarios troubleshooting
    • How billing works
  • Management API
    • Overview
    • Developer Basics
    • Authorization
    • Callbacks
    • Child accounts
    • Accessing secure objects
  • Web and Mobile SDKs
    • iOS: CallKit
    • Android: ConnectionService
    • Screen sharing
    • Custom video sources
    • Mobile SDK statistics
LogoLogo
Platform docsVideosCommunitySign up
On this page
  • How to use
  • Request examples
VoxEngine Development

Working with the Voximplant's API

Call the Voximplant Management API directly from a VoxEngine scenario
||View as Markdown|

VoxEngine allows developers to make Voximplant’s Management API requests from within the scenario. For example, you can send an SMS message, or request a call history. Normally you can do one of these actions by calling one of Management API methods.

How to use

To make Management API requests from a scenario, first prepare your account:

  1. Generate a private API key in the Voximplant control panel. See Service accounts for more information.
  2. Bind the API key to the routing rule by calling the SetRuleInfo Management API method and specifying it in the bind_key_id parameter.

In the scenario, first require the VoximplantApi module:

1require(Modules.VoximplantAPI);

And create the Voximplant.Client instance:

1const client = new VoximplantApi.Client();

Now you are ready to make a request from your scenario.

You can find the list of available requests in the API reference.

Request examples

Here you can find examples of how to perform management API requests from a scenario.

This example sends an SMS message containing a “Test message” text from the 447443332211 phone number to the 447443332212 phone number:

Send an SMS
1client.SMS.sendSmsMessage({
2 source: '447443332211',
3 destination: '447443332212',
4 smsBody: 'Test message'
5})
6 .then((ev) => Logger.write(ev))
7 .catch((err) => Logger.write(err));

This example gets the first call session history record from the 2012-01-01 00:00:00 UTC to the 2014-01-01 00:00:00 UTC:

Get a call history item
1client.History.getCallHistory({
2 fromDate: new Date('2012-01-01 00:00:00 GMT'),
3 toDate: new Date('2014-01-01 00:00:00 GMT'),
4 count: '1',
5 timezone: 'Etc/GMT'
6})
7 .then((ev) => Logger.write(ev))
8 .catch((err) => Logger.write(err));
Was this page helpful?
Edit this page
Previous

Working with API requests

Next

Remote session management

Built with