Endpoint Details
HTTP Method: POST URL: [https://voice-gateway-service-production.up.railway.app/api/v1/calls](https://voice-gateway-service-production.up.railway.app/api/v1/calls)
Headers
Header | Value | Description |
Content-Type |
| Specifies the payload format. |
X-API-KEY |
| The API Key associated with your Organizational Unit (OU). |
Request Payload Parameters
Pass the following parameters in the JSON body of your request:
Parameter | Type | Description |
| Integer | The unique identifier for the calling channel. This can be found in Retool. |
| String | The phone number of the channel originating the call. |
| String | The destination phone number of the client. |
| String | The name of the client receiving the call. |
| String | Optional. Overrides the predetermined pipeline. Add the specific pipeline ID you wish to use. |
| Object | Optional. Matches |
| String | Optional. Overrides the default opening message configured in the pipeline. |
| Object | Optional. Matches |
Code Examples
Example 1: Standard Outbound Call with Custom Prompt Variables
This example demonstrates how to initiate a call while injecting dynamic variables into both the mission prompt and a customized first message.
Bash
curl --location 'https://voice-gateway-service-production.up.railway.app/api/v1/calls' \ --header 'Content-Type: application/json' \ --header 'X-API-KEY: <YOUR_API_KEY>' \ --data '{ "channel_id": 123, "from_phone_number": "+549341567894", "to_phone_number": "+5493415678937", "customer_name": "John Doe", "initial_pipeline_id": "345", "prompt_templates": { "consignatario": "onboarding" }, "first_message": "Hello, how are you?", "variable_values": { "name": "John Doe" } }'
