Skip to main content
POST
/
send-call
Send a call
curl --request POST \
  --url https://api.kuralx.com/v1/send-call \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "agent_id": "<string>",
  "call_to": "<string>",
  "custom_variables": {
    "customer_name": "John Doe",
    "order_number": "12345",
    "appointment_date": "2025-01-15"
  }
}
'
{
  "status": "success",
  "call_id": "<string>",
  "message": "Call successfully queued"
}

Documentation Index

Fetch the complete documentation index at: https://kuralynx.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Custom Variables

Custom variables allow you to pass dynamic data that gets injected into your agent’s instructions, welcome messages, and workflow nodes. This enables personalized conversations based on customer data, order information, appointment details, and more.

How It Works

When you provide custom_variables in your request, they are:
  • Stored with the call: Custom variables are preserved even if the call is queued due to concurrency limits
  • Injected into agent prompts: Variables can be referenced in your agent’s instructions using {{variable}} or {variable} syntax
  • Available in welcome messages: Use variables in the agent’s first sentence/welcome message
  • Used in workflow nodes: For multi-conversation agents, variables are replaced in workflow node instructions
  • Provided as context: Variables are also made available to the LLM as context during conversations

Variable Syntax

You can use variables in two formats:
  • {{variable_name}} - Double curly braces (recommended)
  • {variable_name} - Single curly braces
Both formats work identically. The double curly brace format is recommended for clarity.

Special Aliases

The following special aliases are automatically created from common variable names:
  • customer.name ← from customer_name
  • customer.email ← from customer_email
  • customer.phone ← from customer_phone
These aliases are available in addition to the original variable names.

Example Request

custom_variables
object
customer_name
string
Customer’s full name
order_number
string
Order or reference number
appointment_date
string
Appointment date/time
{
  "agent_id": "your-agent-id",
  "call_to": "+1234567890",
  "custom_variables": {
    "customer_name": "John Doe",
    "order_number": "ORD-12345",
    "appointment_date": "January 15, 2025 at 2:00 PM"
  }
}

Using Variables in Agent Instructions

In your agent’s prompt/instructions, you can reference variables like this:
Hello {{customer_name}}, this is a call regarding your order {{order_number}}. 
Your appointment is scheduled for {{appointment_date}}.
When the call is made, these will be replaced with the actual values:
Hello John Doe, this is a call regarding your order ORD-12345. 
Your appointment is scheduled for January 15, 2025 at 2:00 PM.

Using Variables in Welcome Messages

If your agent has a first_sentence configured, you can use variables there too:
Welcome {{customer_name}}! We're calling about order {{order_number}}.

Common Use Cases

Customer Information
{
  "custom_variables": {
    "customer_name": "Jane Smith",
    "customer_email": "jane@example.com",
    "customer_phone": "+1234567890"
  }
}
Order Details
{
  "custom_variables": {
    "order_number": "ORD-789",
    "order_total": "$149.99",
    "order_date": "2025-01-10",
    "shipping_status": "In Transit"
  }
}
Appointment Scheduling
{
  "custom_variables": {
    "appointment_date": "January 20, 2025",
    "appointment_time": "3:00 PM",
    "appointment_type": "Follow-up Consultation",
    "location": "Main Office"
  }
}

Notes

  • Custom variables are optional - you can make calls without them
  • Variables are stored as JSONB in the database, so they’re preserved for queued calls
  • Variable names are case-sensitive
  • Variable values are converted to strings when injected into text
  • If a variable is not provided, the placeholder (e.g., {{variable_name}}) will remain in the text

Authorizations

Authorization
string
header
required

API key for authentication

Body

application/json

Call request parameters

agent_id
string
required

The ID of the agent that will handle the call

call_to
string
required

Mobile number to call with country code (e.g., +1234567890)

custom_variables
object

Optional custom variables dictionary for dynamic variable injection in agent instructions, welcome messages, and workflow nodes. Variables are stored with queued calls and available when the call is processed. Use {{variable}} or {variable} syntax in your agent prompts.

Example:
{
"customer_name": "John Doe",
"order_number": "12345",
"appointment_date": "2025-01-15"
}

Response

Call initiated successfully

status
string

Status of the call initiation

Example:

"success"

call_id
string

Unique identifier for the initiated call

message
string

Success message

Example:

"Call successfully queued"