If you want to use the content of this page with an AI tool, or if you are an AI agent, use the Markdown version of this page: https://developers.sinch.com/docs/voice-2.0/getting-started.md
You may also connect to our documentation MCP server by clicking the Connect MCP button:
Using the Voice API v2 requires signing up for a free account on the Sinch Build Dashboard. If you haven't already done so, sign up now!
Follow the steps below to learn how to quickly start making calls using the Sinch Voice API:
Get your free Sinch testing number. When you sign up for a Sinch Build Dashboard account, you get a free virtual number for testing. You must activate your test number before you can use it. To activate your number, simply click the link.
Then, create your access key. Access keys are used to authenticate calls when using Voice API v2. Access keys are generated in the Sinch Build Dashboard.
Make sure you have your access key, access key secret, and project ID readily available. This information will be required when making the API request to make a phone call. The access key and access key secret must be recorded during access key creation. The project ID can be found on the Sinch Build Dashboard's Project Settings page.
In the Sinch Build dashboard, navigate to the Numbers section and locate Your virtual numbers.
Click on your number to go into the details for that number. Scroll down to the Voice Configuration section and click Edit. There you can select your default service. Make sure to save your settings.
Now you're ready to get started making a phone call using the Voice API v2.
If you already have experience making API requests, you can create an application that makes the phone call in your preferred coding language.
The payload, along with instructions on how to populate placeholder variables, is below. Alternatively, each tab features a guide that will walk you through setting up a simple application in the identified coding language (make sure you bring all the information you gathered during this process!):
To initiate an outbound call, send a POST request to the /v2/projects/{projectId}/calls endpoint. The SVAML payload should be included in the commands field:
- Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region.https://voice.api.sinch.com/v2/projects/{projectId}/calls
- North America 1 - Easthttps://us1.voice.api.sinch.com/v2/projects/{projectId}/calls
- South America 1 - Easthttps://br1.voice.api.sinch.com/v2/projects/{projectId}/calls
- Europe 1 - Centralhttps://eu1.voice.api.sinch.com/v2/projects/{projectId}/calls
- Asia Pacific 1 - Southeasthttps://sg1.voice.api.sinch.com/v2/projects/{projectId}/calls
- Australia & Oceania 1 - Southeasthttps://au1.voice.api.sinch.com/v2/projects/{projectId}/calls
- Outbound call to a phone number
- Outbound call to a WebSocket stream endpoint
- Batch of outbound calls with parameters
{ "commands": [ { … } ] }
The placeholder values included in the payload above are detailed in the table below:
| Placeholder value | Your value |
|---|---|
| {YOUR_Number} | This is your test number that you activated in a previous step. |
| {YOUR_Destination_number} | This is a number you have verified in the Build dashboard. |
When you make the request, don't forget to include your project ID, and your access key and secret. Since this guide is intended for testing purposes, you can use your access key and access secret to authenticate using basic authentication.
Congratulations! You have successfully initiated your first outbound call.
You can also call the phone number assigned to your Voice service and handle that incoming call. The Voice API v2 can respond to incoming calls in one of two ways:
- Sending an event to the webhook configured on your Voice service when a call is received
- Configuring static SVAML code to your Voice service which triggers when a call is received.
Since setting up your own server to listen for incoming requests can be a bit intensive, this guide will show you how to configure your Voice service with static SVAML code.
If you already have experience making API requests, you can create an application that updates your service in your preferred coding language.
The payload, along with instructions on how to populate placeholder variables, is below. Alternatively, each tab features a guide that will walk you through setting up a simple application in the identified coding language (make sure you bring all the information you gathered during this process!):
To update your service with static SVAML, send a PATCH request to the /v2/projects/{projectId}/services/{serviceId} endpoint. You will update the call behavior of the service as shown below:
- Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region.https://voice.api.sinch.com/v2/projects/{projectId}/services/{serviceId}
- North America 1 - Easthttps://us1.voice.api.sinch.com/v2/projects/{projectId}/services/{serviceId}
- South America 1 - Easthttps://br1.voice.api.sinch.com/v2/projects/{projectId}/services/{serviceId}
- Europe 1 - Centralhttps://eu1.voice.api.sinch.com/v2/projects/{projectId}/services/{serviceId}
- Asia Pacific 1 - Southeasthttps://sg1.voice.api.sinch.com/v2/projects/{projectId}/services/{serviceId}
- Australia & Oceania 1 - Southeasthttps://au1.voice.api.sinch.com/v2/projects/{projectId}/services/{serviceId}
{ "description": "Service with static SVAML", "callBehavior": { "type": "STATIC", "static": { … } } }
When you make the request, don't forget to include your project ID, and your access key and secret. Since this guide is intended for testing purposes, you can use your access key and access secret to authenticate using basic authentication.
Now that you've updated your service, call the phone number assigned to your Voice service. The call should be answered and you'll hear the text of the SAY command in the SVAML.
Now that you know how to make an outbound call and handle an incoming call, you can start to build more complex solutions. Check out the following guides to see what you can do with Voice API v2: