Skip to main content

Calls - Darwin Endpoint for Outbound

The Outbound Call API allows you to programmatically initiate automated outbound voice calls. Through this endpoint, you can dynamically assign pipelines, override the default opening message, and inject variable data directly into your agent's prompts

S
Written by Support Team

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

application/json

Specifies the payload format.

X-API-KEY

string

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

channel_id

Integer

The unique identifier for the calling channel. This can be found in Retool.

from_phone_number

String

The phone number of the channel originating the call.

to_phone_number

String

The destination phone number of the client.

customer_name

String

The name of the client receiving the call.

initial_pipeline_id

String

Optional. Overrides the predetermined pipeline. Add the specific pipeline ID you wish to use.

prompt_templates

Object

Optional. Matches {{variable_name}} tags within the mission to their dynamic values.

first_message

String

Optional. Overrides the default opening message configured in the pipeline.

variable_values

Object

Optional. Matches {{variable_name}} tags specifically used within your custom first_message.

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"     } }'
Did this answer your question?