Skip to main content

How to make Outbound Calls

In this guide we will show you how to make outbound calls using Bandwidth’s platform. Please ensure you have followed our quick start guide and ordered your first phone number.

You can embed outbound calling capabilities directly into your application or product using our API without having to handle legacy telecom infrastructure.

Make an outbound call

To create an outbound call from a Bandwidth number, you must make a POST request to our API v2 /calls endpoint. This can be done through our SDKs, using tools like Postman, or in command line.

Note: Remember to add authentication for your application if needed!

POST https://voice.bandwidth.com/api/v2/accounts/{accountId}/calls
//Make sure an authentication header is added with your BANDWIDTH_USERNAME and BANDWIDTH_PASSWORD
{
"from": "{BW_NUMBER}",
"to": "{$USER_NUMBER}",
"applicationId": "{APPLICATION_ID}",
"answerUrl": "http://example.test/callbacks/answer",
}

After this call is created, Bandwidth will send a webhook to the answerUrl, expecting BXML in response to continue the call with your chosen action.

What is BXML?

BXML webhooks are HTTP requests made by the Bandwidth platform to endpoints specified by you in your HTTP requests and BXML.

Their purpose is to

  • Inform you of events that have happened in the call flow
  • Receive instructions from your application on what to do next.

More information on BXML can be found here.

Where to next?

Now that you have made your first outbound call, some of the available BXML/API actions are available in the following guides: