curl and a DialNexa account.
Before you begin
- Create an API key in the dashboard under Settings > API Keys. The key has the form
key_id:secretand the full value is your Bearer token. See Authentication for details. - Every request in this guide uses the v1 base URL:
- To place a real call in step 5, the destination country must be enabled in Workspace Settings > Telephony Config, or you need a SIP/BYOC route.
Step 1: Verify your API key
Send any authenticated GET request to confirm the key works. Listing languages is a safe, read-only check:200 response with a JSON array means you are authenticated. A 401 Unauthorized means the key is missing, malformed, or revoked. Check that you sent the full key_id:secret value and see Errors for the standard error format.
Note the id of the language you want your agent to speak. You will use it in step 3.
Step 2: List voices
Agents need a voice. List the catalog and pick one:voices array with pagination fields. Copy the id of a voice you like. You can filter by provider, gender, or language_id; see List Voices for all filters.
Step 3: Create an agent
An agent combines a voice, a language, and a prompt into a deployable entity. Onlytitle, language_id, voice_id, and prompt_text are required:
id. The {{customer_name}} placeholder is a dynamic variable; you supply its value per call after publishing.
Step 4: Publish version 1
New agents start as drafts. Publish version 1 before using it for a live call:Step 5: Trigger a call
Place a single outbound call with the agent.phone_number, agent_id, and metadata are required; metadata carries the dynamic variable values (send {} if the prompt uses none):
phone_number must be in E.164 format, + followed by the country code and number. The response includes the call id. See Create Call for destination validation rules.
Step 6: Read the result
Fetch the call to see its status, duration, and outcome:status moves from initiated to in-progress, then to a terminal state such as completed, failed, busy, or no-answer. For production integrations, prefer webhooks over polling; see Get Call Details for polling guidance.
Resource ID prefixes
DialNexa IDs are prefixed strings that tell you what kind of resource you are holding:
Some catalog resources, such as voices and LLMs, return IDs without a prefix. Always treat IDs as opaque strings and copy them from API responses rather than constructing them.
Next steps
- Introduction: the full API overview and key concepts.
- Create Batch Call: call a whole list of contacts from one file upload.
- Create Webhook: get notified when calls end instead of polling.
- Pagination: how list endpoints page their results.
- Errors: the standard error format and how to handle it.