What you’ll learn

  • How to make outbound phone calls using the Verbex Platform

Introduction

Making outbound calls in the Verbex Platform allows your AI Agent to connect with users directly through phone calls. This guide will walk you through the process of making outbound calls using our REST API.

Making an Outbound Call

To make an outbound call, use the REST API with the following parameters:

  • from_number: The e.164 string format of the number you purchased
  • to_number: The phone number you want to call in e.164 string format. The number must be from the added phone numbers in your Verbex account.
  • direction: Specifies whether this is an incoming or outgoing call. Available options: inbound, outbound.
  • metadata: Custom key-value pairs for storing call-specific information.
  • override_ai_agent_id: Optional alternative AI agent identifier for special handling scenarios. (Coming Soon)
  • pia_llm_dynamic_data: Dynamic data to be used by the AI agent during this call. Use it to send information about this particular call to the AI agent.

Example REST API call:

POST /v1/calls/dial-outbound-phone-call
Content-Type: application/json

{
  "from_number": "+14157774444",
  "to_number": "+12137774445",
  "direction": "outbound",
  "metadata": {
    "call_type": "sales"
  },
  "pia_llm_dynamic_data": {
    "customer_name": "John Doe",
    "customer_email": "john.doe@example.com",
    "last_order_date": "2024-01-01",
    "last_ordered_product": "abc"
  }
}

Example curl Command

To make an outbound call using the API, you can use the following curl command. Make sure to replace YOUR_API_KEY with your actual API key:

curl -X POST https://api.verbex.com/v1/calls/dial-outbound-phone-call \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "from_number": "+14157774444",
    "to_number": "+12137774445",
    "direction": "outbound",
    "metadata": {
      "call_type": "sales"
    },
    "pia_llm_dynamic_data": {
      "customer_name": "John Doe",
      "customer_email": "john.doe@example.com",
      "last_order_date": "2024-01-01",
      "last_ordered_product": "abc"
    }
  }'