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

# API Overview

> Overview of Dialflo APIs for initiating and managing AI-powered calls

Dialflo APIs allow you to programmatically initiate AI-powered voice calls and retrieve structured insights after a call is completed.

With these APIs, you can:

* Initiate outbound calls with personalized context
* Retrieve post-call conversation insights
* Receive call data in real time via webhooks

***

## Base URL

All API requests are made to:

```
https://api.dialflo.ai
```

***

## Authentication

All API requests require authentication using your organization's API token.

Include the following headers with every request:

```json theme={null}
{
  "auth_token": "Bearer <YOUR_DIALFLO_API_TOKEN>",
  "Content-Type": "application/json"
}
```

***

## Available Endpoints

***

### Get Call Details

`GET /call_details/<TASK_ID>`

Retrieves structured insights and metadata for a completed call.

#### Request

```bash theme={null}
curl --location 'https://api.dialflo.ai/call_details/<task_id>' \
--header 'auth_token: Bearer <YOUR_DIALFLO_API_TOKEN>'
```

#### Response

The response includes comprehensive call data and AI-generated insights:

```json theme={null}
[
    {
        "agent_name": "ONEST",
        "call_context": {},
        "call_insights": {
            "metadata": {
                "degree": "No",
                "call_time": "20th March 10 AM",
                "current_job": "",
                "current_city": ""
            },
            "user_interest": {
                "status": "Unclear",
                "confidence_score": 0.0,
                "reasoning": "The user did not provide a clear response to any of the questions."
            },
            "next_action": {
                "value": "REDIAL",
                "reason": "Candidate did not engage in the discussion."
            }
        },
        "call_recording_url": "https://media.plivo.com/v1/Account/MAZTM5OTQ0YZG5YJAYNT/Recording/ffd20998-3f37-4ddb-9341-0a1c9061b36c.mp3",
        "from_number": "918035736461",
        "to_number": "917407656243",
        "call_status": "ANSWERED",
        "call_duration": 23.0
    }
]
```

#### Response Fields

| Field                         | Type   | Description                                               |
| ----------------------------- | ------ | --------------------------------------------------------- |
| `agent_name`                  | string | Name of the AI agent that made the call                   |
| `call_context`                | object | Custom context variables passed during call initiation    |
| `call_insights`               | object | AI-generated insights from the conversation               |
| `call_insights.metadata`      | object | Extracted data points from the conversation               |
| `call_insights.user_interest` | object | User's interest level with confidence score and reasoning |
| `call_insights.next_action`   | object | Recommended next action with explanation                  |
| `call_recording_url`          | string | URL to access the call recording                          |
| `from_number`                 | string | Phone number the call was made from                       |
| `to_number`                   | string | Phone number the call was made to                         |
| `call_status`                 | string | Status of the call (e.g., ANSWERED, NO\_ANSWER, BUSY)     |
| `call_duration`               | number | Duration of the call in seconds                           |

***

## Rate Limits

Rate limits apply to all API endpoints. Contact your account manager for details specific to your plan.

***

## Support

For API support or questions, contact: **[abhishek@dialflo.ai](mailto:abhishek@dialflo.ai)**
