Need to call hundreds or thousands of contacts? Use Batch Calls instead. This guide focuses on one-off, programmatically triggered calls.
Prerequisites
Before placing an outbound call, verify that:- You have an active agent — the agent must be published, not in draft. You can confirm this in the dashboard under Agents, or by checking
status: "active"on the agent object. - A phone number is assigned to the agent — outbound calls are placed from a Truedy number that belongs to your account and is linked to the agent. If no number is assigned, the call will fail immediately with a
no_phone_number_configurederror. - You have a valid API key — all API requests require
Authorization: Bearer YOUR_API_KEYin the request headers.
Placing a Call
Send aPOST request to /calls with the agent and destination phone number.
Endpoint
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
agent_id | string | Yes | The ID of the agent that will handle the call |
phone_number | string | Yes | The destination phone number in E.164 format (e.g. +14155551234) |
variables | object | No | Key-value pairs for template substitution in the agent’s prompt |
from_number | string | No | Override the caller ID (must be a number assigned to the agent). If omitted, Truedy picks from the agent’s assigned outbound numbers automatically |
call_settings | object | No | Per-call overrides for recording, greeting, and timeouts (see below) |
call_settings fields (all optional):
| Field | Type | Description |
|---|---|---|
recording_enabled | boolean | Whether to record this call. Default: true |
transcription_enabled | boolean | Whether to transcribe this call. Default: true |
greeting | string | Override the agent’s opening line for this call only |
max_duration | string | Max call duration, e.g. "1800s". Overrides agent default |
join_timeout | string | Timeout for callee to answer, e.g. "30s". Overrides agent default |
About variables
Your agent’s prompt can include template placeholders using double curly braces: {{first_name}}, {{appointment_date}}, etc. When you pass a variables object with the call, Truedy substitutes those values into the prompt before the conversation starts. This lets a single agent handle personalised calls at scale without creating separate agents per contact.
For example, a prompt containing:
variables.
Examples
Response
A successful request returns HTTP201 Created with the newly created call object:
id field is the call identifier you will use to poll for status or match against webhook events.
Monitoring Call Progress
Once you have the call ID, you can track the call to completion using polling or webhooks.Option 1: Polling
CallGET /calls/{id} repeatedly until the status reaches a terminal state (ended, failed, or cancelled).
Option 2: Webhooks (Recommended)
Register a webhook endpoint and Truedy will deliver acall.ended event to your server automatically when the call finishes — no polling required.
See Webhooks Overview to set up your endpoint. The call.ended event payload includes the full call object, including transcript and recording URL.
Phone Number Format
Thephone_number field must use E.164 format:
- Starts with
+ - Followed by the country code and subscriber number, no spaces or dashes
- Examples:
+14155551234(US),+447911123456(UK),+61291234567(AU)
Common Errors
| HTTP Status | Error Code | Meaning | Resolution |
|---|---|---|---|
404 Not Found | agent_not_found | No agent exists with the given agent_id | Verify the agent ID in your dashboard |
422 Unprocessable Entity | no_phone_number_configured | The agent has no outbound number assigned | Assign a phone number to the agent in Settings → Phone Numbers |
422 Unprocessable Entity | invalid_phone_number | phone_number is not valid E.164 format | Reformat the number (e.g. +14155551234) |
422 Unprocessable Entity | agent_not_active | The agent is in draft or paused state | Publish the agent before placing calls |
429 Too Many Requests | rate_limited | You’ve exceeded the API rate limit | Implement exponential backoff and retry |
402 Payment Required | insufficient_credits | Your account balance is too low | Top up credits or check your billing plan |
Next Steps
Calls Overview
Understand call statuses, directions, and lifecycle
Batch Calls & Campaigns
Call many contacts at once with campaigns
Webhooks Overview
Receive real-time events instead of polling
Call Management
List, filter, and retrieve call records

