Skip to main content
This quickstart walks you through your first six DialNexa v1 API requests. In about ten minutes you will authenticate, pick a voice, create and publish an agent, place an outbound call, and read the call result. All you need is a terminal with 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:secret and the full value is your Bearer token. See API fundamentals 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

Call Validate API Key. It is the purpose-built check: read-only, it creates nothing, and it tells you which workspace the key belongs to.
A 200 response contains data.valid: true, the key’s id and name, and data.organization.id. Confirm that workspace ID is the one you meant to use, since a key from another workspace authenticates successfully and then acts on the wrong data. A 401 Unauthorized means the key is missing, malformed, unknown, expired, or revoked. An invalid key returns an error rather than a success response with valid: false. Check that you sent the complete key_id:secret value and see API fundamentals for the standard error format.

Step 2: List languages and voices

An agent needs a language and a voice. List both catalogs and copy one id from each.
The voices response wraps the records in a 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. Pick a voice that supports the language you chose.

Step 3: Create an agent

An agent combines a voice, a language, and a prompt into a deployable entity. Only title, language_id, voice_id, and prompt_text are required:
The response returns the new agent. Save its 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:
Confirm the response shows the version as published. If the API says the version is already published, continue to the next step. See Update Agent for phone-number assignment and published-version rules.

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:
The 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