Docsvoxioagent 2.0.0

Server

Phone calls

Have your agent call a phone number now or at a set time, and answer calls to your numbers.

Phone calls aren't in the SDK yet. Call these REST endpoints from your server, with your account key and the flow's key in the headers.

Before you begin

You need:

  • A phone number attached to the flow, on its Numbers tab in the dashboard.
  • Your account key and the flow key, as VOXIO_SECRET_KEY and VOXIO_FLOW_KEY environment variables.

Call a number now

Post the two numbers to start the call:

curl -X POST https://call.voxio.in/plivo/outbound \
-H "user_api_key: $VOXIO_SECRET_KEY" \
-H "flow_api_key: $VOXIO_FLOW_KEY" \
-H "content-type: application/json" \
-d '{
"from-number": "FROM_NUMBER",
"to-number": "TO_NUMBER",
"customs": { "variables": { "customer_name": "Priya" } }
}'

Replace the following:

  • FROM_NUMBER: one of your numbers in E.164 format, such as +91XXXXXXXXXX
  • TO_NUMBER: the number to call, in E.164 format, such as +91XXXXXXXXXX

The phone rings within a few seconds, and the agent speaks when it's answered. The request body takes:

from-numberE.164required
One of your numbers.
to-numberE.164required
The number to call, with its country code.
session_idstring
Your own id for the call. It comes back in the call’s webhooks.
customsobject
Overrides for this call, as for browser sessions.

Schedule a call

To call later, post to the schedule endpoint with a time:

curl -X POST https://call.voxio.in/plivo/outbound/schedule \
-H "user_api_key: $VOXIO_SECRET_KEY" \
-H "flow_api_key: $VOXIO_FLOW_KEY" \
-H "content-type: application/json" \
-d '{ "from-number": "FROM_NUMBER", "to-number": "TO_NUMBER",
"datetimezone": "01102026 1430 IST" }'

datetimezone is DDMMYYYY HHMM ZONE. This example calls at 2:30 PM IST on 1 October 2026.

Answer incoming calls

A call to one of your numbers is answered by the flow the number is attached to. Each call is a session, with webhooks like any other.

Next steps