> ## Documentation Index
> Fetch the complete documentation index at: https://dialnexa.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Everything you need to start building with the DialNexa API.

## Overview

The DialNexa API is a REST API that lets you build, deploy, and monitor AI voice agents programmatically. Use it to create agents, trigger calls, manage batch calls and workflows, work with catalog resources, manage webhooks, and connect phone numbers from your backend.

## DialNexa API base URL

Use this base URL for every documented API request:

```
https://api.dialnexa.com/v1
```

The API reference lists only `/v1` operations. Keep `/v1` in the base URL when you build requests manually or configure an HTTP client.

Legacy unversioned API routes with confirmed `/v1` replacements were retired on July 31, 2026. Those routes are no longer part of the supported API and can return `404 Not Found`. New integrations must use `/v1` routes.

All requests and responses use JSON, except for file upload endpoints which use `multipart/form-data`.

## What you can build

* **Outbound calling**: Trigger individual calls or batch calls from your backend. Pass customer-specific data at call time and have the agent personalize every conversation.
* **Inbound handling**: Assign an agent to a purchased phone number to automatically handle every incoming call.
* **Batch calls**: Upload a CSV or Excel file of leads, start outbound calls, and pause, resume, or cancel the batch.
* **Workflows**: Build multi-step calling sequences where a lead's path through the workflow is determined by call outcomes and workflow logic.
* **Phone numbers**: Search Plivo inventory, purchase a provider number, link a bring-your-own SIP trunk, or delete a number you no longer use.
* **Webhooks**: Register an HTTPS endpoint and receive a signed notification when a call that was not placed directly by a batch call ends.

## Key concepts

**Agents** are the core building block. An agent combines a voice, a language model, a system prompt, and telephony configuration into a single deployable entity. All calls, whether outbound, inbound, or browser-based, are handled by an agent.

**Dynamic variables** let you personalize agents at call time. Any key in the `metadata` object passed when creating a call, or any column header in a leads file, becomes a `{{variable_name}}` that the agent can reference in its prompt. For example, if you pass `{"customer_name": "Priya"}`, the prompt can say `Hello {{customer_name}}!` and the agent will greet the caller by name.

**Batch Calls** are bulk outbound calling jobs created from a lead file. Use `PATCH /v1/batch-calls/{id}/status` to pause, resume, or cancel a batch.

**Workflows** are directed graphs where each node is an action (a call, a time delay, a conditional check) and each edge defines what happens next based on the outcome of that action.

## Make your first request

**1. Get an API key**

In the dashboard, open **Settings > API Keys** and create a key. Copy it immediately because it is shown only once. See [API fundamentals](https://dialnexa.com/docs/api-reference/api-fundamentals.md#authenticate-dialnexa-api-requests).

**2. List your agents**

```bash theme={null}
curl https://api.dialnexa.com/v1/agents \
  -H "Authorization: Bearer YOUR_API_KEY"
```

A `200` response returns the agents in `data.agents`. Agent listing is not paginated today.

**3. Trigger a call**

Publish the agent version, then take its `agent_id` and [create a v1 call](https://dialnexa.com/docs/api-reference/v1/calls/create.md). Watch the result arrive in Call History.

## Request format

Set the `Content-Type` header to `application/json` for all requests with a body:

```bash theme={null}
curl -X POST https://api.dialnexa.com/v1/calls \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agent_id": "agent_abc123", "phone_number": "+919876543210", "metadata": {}}'
```

## Response format

Successful responses return HTTP `200` or `201` with a JSON body. Errors always carry a `message`, plus `data.code` for a coded refusal. Calls, batch calls, voices, languages, and LLMs return only those fields; for example, Create Call for an agent with two outbound numbers and no `phone_number_id` returns `400` with:

```json theme={null}
{
  "message": "Request validation failed: Agent agent_abc123 has 2 outbound numbers. Pass phone_number_id to choose which one to dial from.",
  "data": {
    "code": "PHONE_NUMBER_REQUIRED",
    "phone_number_ids": ["phn_abc123", "phn_def456"]
  }
}
```

Other endpoints wrap the same `message` in a full envelope with `statusCode`, `error`, `success`, `data`, and `errors`.

Each API key can make 150 requests per 60 seconds, counted separately for each endpoint; see [Rate limits](https://dialnexa.com/docs/api-reference/api-fundamentals.md#rate-limits).

See [API fundamentals](https://dialnexa.com/docs/api-reference/api-fundamentals.md#handle-dialnexa-api-errors) for error codes, response handling, and retry decisions.

## Tools

First-party SDK packages are not yet published - the HTTP API is the supported integration path, and it works with any HTTP client. The [SDKs section](https://dialnexa.com/docs/sdks/overview.md) has copy-paste HTTP patterns for TypeScript and Python, plus the status of the planned client SDKs. For interactive testing, every endpoint in this reference includes a built-in request builder: fill in your API key and parameters, then send directly from the docs.

To add a DialNexa API workflow to an existing product, use the [AI coding agent integration guide](https://dialnexa.com/docs/api-reference/ai-coding-agent-integration.md). It provides copy-ready prompts for Codex, Cursor, and Claude Code, with testing and production-safety requirements included.

AI agents and IDE assistants can also use the [DialNexa docs MCP server](https://dialnexa.com/docs/mcp) to search the docs and read documentation files through MCP tools.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.