# Phone calls

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

Source: https://voxio.in/docs/phone-calls · voxioagent 2.0.0 · Index: https://voxio.in/docs/llms.txt

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:

```bash
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-number` (E.164, required): One of your numbers.
- `to-number` (E.164, required): The number to call, with its country code.
- `session_id` (string): Your own id for the call. It comes back in the call’s webhooks.
- `customs` (object): Overrides for this call, as for [browser sessions](https://voxio.in/docs/sessions.md#pass-values-to-the-workflow).

## Schedule a call

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

```bash
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

- [Webhooks](https://voxio.in/docs/webhooks.md): get each call’s transcript on your server.
- [Headless sessions](https://voxio.in/docs/sessions.md#pass-values-to-the-workflow): see what you can put in customs.
