In this Programmable Voice Calling API Quickstart, you'll learn how to handle inbound voice calls using webhooks, Flow Builder, and MessageBird’s Programmable Voice Calling API.
We’ll walk you through the following steps:
To retrieve a Call Flow from a URL (i.e. set up a call webhook), you must use the HTTP GET method in your application.
When a person calls a virtual number assigned to such a URL via Flow Builder, you'll need to make an HTTP request to your application and retrieve the call flow - this will be what the caller hears on the other end of the call.
Since it's a GET, you'll need to send parameters in the query string.
For most applications, you should only need the source field - which indicates the phone number that's calling.
Your application should return a call flow encoded as JSON or XML with the appropriate content type, for example, application/json for a JSON-encoded call flow or application/xml for an XML-encoded call flow.
Here’s an example of an XML-encoded call flow with a single step:
<?xml version="1.0" encoding="UTF-8"?><Say language="en-GB" voice="female">Hello, thanks for calling!</Say>
We recommend that you check the Voice Calling API documentation for a list of available step actions and options.
Now, configure a simple flow using Flow Builder to handle inbound voice calls on a virtual number:
Congrats! You can now programmatically handle inbound voice calls using Webhooks, Flow Builder, and the Programmable Voice Calling API.