> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.anthropod.in/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.anthropod.in/_mcp/server.

# Create Call Analysis

POST https://anthropod.in/api/v2/call_analytics/batch/
Content-Type: application/json

Submit call records for asynchronous analysis. HTTP 200 with a nonempty processing_id acknowledges receipt; per-record validation and analysis continue afterwards. Configure an analytics callback in Dashboard → Developer Hub → Configuration to receive results. [Call Analytics guide](/call-analytics). Each record supports optional lead source, CRM stage/substage, follow-up and lead creation times, location, customer phone, campaign identifiers, and tags. The full input schema below defines these fields; reprocess defaults to 0. A null processing_id means initiation was not confirmed, even with HTTP 200. Contact support before resubmitting.

Reference: https://docs.anthropod.in/api-reference/conversation-analytics/call-analytics

## Authentication

- `Authorization` header (bearer token, required) — Existing private account API key from Developer Hub. Keep it on your backend.

## Request

### Body (application/json)

This endpoint expects an object.

- `service_id` (string, required) — Authorized project/service name from Developer Hub.
- `data` (list of object, required) — Between 1 and 20 records per batch. Per-record CRM, campaign, tag fields are described below.
  - `id` (string, required) — Your stable source conversation identifier.
  - `customer_id` (string, required) — Your customer identifier.
  - `employee_id` (string, required) — Your agent or employee identifier.
  - `call_time` (long, required) — 10-digit Unix epoch seconds. Must be on or after 1 January 2024 and not in the future.
  - `call_record_link` (string, optional) — Downloadable recording URL for connected calls; keep it accessible until processing completes. Supported audio formats include WAV, MP3, OGG, M4A, AAC and WMA; maximum duration is 120 minutes. Unanswered calls do not require an audio recording.
  - `call_answer_status` (enum, optional, default: Connected) — Send explicitly to distinguish connected recordings from unanswered calls.
    - Allowed values: `Connected`, `Not Connected`
  - `call_direction` (enum, optional) — Send explicitly when known.
    - Allowed values: `Inbound`, `Outbound`
  - `lead_source` (string, optional, nullable) — Origin of the lead. Uses your own CRM/service values; there is no fixed enum.
  - `lead_sub_source` (string, optional, nullable) — More specific lead source. Uses your own CRM/service values; there is no fixed enum.
  - `crm_lead_stage` (string, optional, nullable) — Lead stage in your CRM. Uses your own CRM/service values; there is no fixed enum.
  - `crm_lead_sub_stage` (string, optional, nullable) — Lead substage in your CRM. Uses your own CRM/service values; there is no fixed enum.
  - `crm_location` (string, optional, nullable) — Location recorded in your CRM. Uses your own CRM/service values; there is no fixed enum.
  - `customer_phone_number` (string, optional, nullable) — Customer telephone number as supplied by your CRM. Uses your own CRM/service values; there is no fixed enum.
  - `campaign_id` (string, optional, nullable) — Your campaign identifier. Uses your own CRM/service values; there is no fixed enum.
  - `campaign_batch_id` (string, optional, nullable) — Your campaign batch identifier. Uses your own CRM/service values; there is no fixed enum.
  - `tag` (string, optional, nullable) — First optional label for filtering and reporting. Uses your own CRM/service values; there is no fixed enum.
  - `tag2` (string, optional, nullable) — Second optional label for filtering and reporting. Uses your own CRM/service values; there is no fixed enum.
  - `tag3` (string, optional, nullable) — Third optional label for filtering and reporting. Uses your own CRM/service values; there is no fixed enum.
  - `crm_followup_time` (long, optional, nullable) — Scheduled CRM follow-up time as 10-digit Unix epoch seconds. On or after 1 January 2024; future times are allowed.
  - `crm_lead_created_at` (long, optional, nullable) — CRM lead creation time as 10-digit Unix epoch seconds, on or after 1 January 2024. Milliseconds are not accepted for this field.
  - `reprocess` (enum, optional, default: 0) — 0 keeps an already processed record unchanged; 1 requests processing again for the same record ID. Failed/in-progress records can be retried by the existing ingestion flow.
    - Allowed values: `0`, `1`
  - `actor_type` (enum, optional) — Type of agent handling the call. Use Human Agent or AI Agent; omit or send null when unknown.
    - Allowed values: `Human Agent`, `AI Agent`

## Response

### 200

Batch initiation result. Acceptance requires a nonempty processing_id; a null value does not confirm acceptance.

- `processing_id` (string, required, nullable) — Batch identifier for tracking processing results. Acceptance requires a nonempty identifier. The existing endpoint can return HTTP 200 with null when initiation fails; contact support before resubmitting.
- `timestamp` (long, required) — Request receipt time in Unix epoch seconds.

## Errors

### 400 Bad Request Error

Invalid source identifier. Further record validation happens asynchronously.

- `error` (string, required) — Descriptive failure reason. Do not depend on exact message wording.
- `error_type` (string, optional) — Optional error category; not returned by every handler.

### 401 Unauthorized Error

Invalid API key or unauthorized service.

- `error` (string, required) — Descriptive failure reason. Do not depend on exact message wording.
- `error_type` (string, optional) — Optional error category; not returned by every handler.

### 403 Forbidden Error

Insufficient account balance.

- `error` (string, required) — Descriptive failure reason. Do not depend on exact message wording.
- `error_type` (string, optional) — Optional error category; not returned by every handler.

### 500 Internal Server Error

Server error.

- `error` (string, required) — Descriptive failure reason. Do not depend on exact message wording.
- `error_type` (string, optional) — Optional error category; not returned by every handler.

## Examples

**Request**

```json
{
  "service_id": "SALES",
  "data": [
    {
      "id": "call_demo_001",
      "customer_id": "customer_demo_001",
      "employee_id": "agent_demo_001",
      "call_time": 1788220800,
      "call_record_link": "https://recordings.example/call_demo_001.mp3",
      "call_answer_status": "Connected",
      "call_direction": "Outbound",
      "lead_source": "Website",
      "lead_sub_source": "Contact form",
      "crm_lead_stage": "Follow-up",
      "crm_lead_sub_stage": "Callback requested",
      "crm_location": "Delhi",
      "customer_phone_number": "+919876543210",
      "campaign_id": "campaign_123",
      "campaign_batch_id": "batch_123",
      "tag": "Sales",
      "tag2": "New lead",
      "tag3": "Priority",
      "crm_followup_time": 1788307200,
      "crm_lead_created_at": 1788134400,
      "reprocess": 0
    }
  ]
}
```

**Response**

```json
{
  "processing_id": "P123e4567e89b42d3a456426614174000",
  "timestamp": 1788307200
}
```

**SDK Code**

```python
import requests

url = "https://anthropod.in/api/v2/call_analytics/batch/"

payload = {
    "service_id": "SALES",
    "data": [
        {
            "id": "call_demo_001",
            "customer_id": "customer_demo_001",
            "employee_id": "agent_demo_001",
            "call_time": 1788220800,
            "call_record_link": "https://recordings.example/call_demo_001.mp3",
            "call_answer_status": "Connected",
            "call_direction": "Outbound",
            "lead_source": "Website",
            "lead_sub_source": "Contact form",
            "crm_lead_stage": "Follow-up",
            "crm_lead_sub_stage": "Callback requested",
            "crm_location": "Delhi",
            "customer_phone_number": "+919876543210",
            "campaign_id": "campaign_123",
            "campaign_batch_id": "batch_123",
            "tag": "Sales",
            "tag2": "New lead",
            "tag3": "Priority",
            "crm_followup_time": 1788307200,
            "crm_lead_created_at": 1788134400,
            "reprocess": 0
        }
    ]
}
headers = {
    "Authorization": "Bearer <accountApiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://anthropod.in/api/v2/call_analytics/batch/';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <accountApiKey>', 'Content-Type': 'application/json'},
  body: '{"service_id":"SALES","data":[{"id":"call_demo_001","customer_id":"customer_demo_001","employee_id":"agent_demo_001","call_time":1788220800,"call_record_link":"https://recordings.example/call_demo_001.mp3","call_answer_status":"Connected","call_direction":"Outbound","lead_source":"Website","lead_sub_source":"Contact form","crm_lead_stage":"Follow-up","crm_lead_sub_stage":"Callback requested","crm_location":"Delhi","customer_phone_number":"+919876543210","campaign_id":"campaign_123","campaign_batch_id":"batch_123","tag":"Sales","tag2":"New lead","tag3":"Priority","crm_followup_time":1788307200,"crm_lead_created_at":1788134400,"reprocess":0}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://anthropod.in/api/v2/call_analytics/batch/"

	payload := strings.NewReader("{\n  \"service_id\": \"SALES\",\n  \"data\": [\n    {\n      \"id\": \"call_demo_001\",\n      \"customer_id\": \"customer_demo_001\",\n      \"employee_id\": \"agent_demo_001\",\n      \"call_time\": 1788220800,\n      \"call_record_link\": \"https://recordings.example/call_demo_001.mp3\",\n      \"call_answer_status\": \"Connected\",\n      \"call_direction\": \"Outbound\",\n      \"lead_source\": \"Website\",\n      \"lead_sub_source\": \"Contact form\",\n      \"crm_lead_stage\": \"Follow-up\",\n      \"crm_lead_sub_stage\": \"Callback requested\",\n      \"crm_location\": \"Delhi\",\n      \"customer_phone_number\": \"+919876543210\",\n      \"campaign_id\": \"campaign_123\",\n      \"campaign_batch_id\": \"batch_123\",\n      \"tag\": \"Sales\",\n      \"tag2\": \"New lead\",\n      \"tag3\": \"Priority\",\n      \"crm_followup_time\": 1788307200,\n      \"crm_lead_created_at\": 1788134400,\n      \"reprocess\": 0\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <accountApiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://anthropod.in/api/v2/call_analytics/batch/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <accountApiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"service_id\": \"SALES\",\n  \"data\": [\n    {\n      \"id\": \"call_demo_001\",\n      \"customer_id\": \"customer_demo_001\",\n      \"employee_id\": \"agent_demo_001\",\n      \"call_time\": 1788220800,\n      \"call_record_link\": \"https://recordings.example/call_demo_001.mp3\",\n      \"call_answer_status\": \"Connected\",\n      \"call_direction\": \"Outbound\",\n      \"lead_source\": \"Website\",\n      \"lead_sub_source\": \"Contact form\",\n      \"crm_lead_stage\": \"Follow-up\",\n      \"crm_lead_sub_stage\": \"Callback requested\",\n      \"crm_location\": \"Delhi\",\n      \"customer_phone_number\": \"+919876543210\",\n      \"campaign_id\": \"campaign_123\",\n      \"campaign_batch_id\": \"batch_123\",\n      \"tag\": \"Sales\",\n      \"tag2\": \"New lead\",\n      \"tag3\": \"Priority\",\n      \"crm_followup_time\": 1788307200,\n      \"crm_lead_created_at\": 1788134400,\n      \"reprocess\": 0\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://anthropod.in/api/v2/call_analytics/batch/")
  .header("Authorization", "Bearer <accountApiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"service_id\": \"SALES\",\n  \"data\": [\n    {\n      \"id\": \"call_demo_001\",\n      \"customer_id\": \"customer_demo_001\",\n      \"employee_id\": \"agent_demo_001\",\n      \"call_time\": 1788220800,\n      \"call_record_link\": \"https://recordings.example/call_demo_001.mp3\",\n      \"call_answer_status\": \"Connected\",\n      \"call_direction\": \"Outbound\",\n      \"lead_source\": \"Website\",\n      \"lead_sub_source\": \"Contact form\",\n      \"crm_lead_stage\": \"Follow-up\",\n      \"crm_lead_sub_stage\": \"Callback requested\",\n      \"crm_location\": \"Delhi\",\n      \"customer_phone_number\": \"+919876543210\",\n      \"campaign_id\": \"campaign_123\",\n      \"campaign_batch_id\": \"batch_123\",\n      \"tag\": \"Sales\",\n      \"tag2\": \"New lead\",\n      \"tag3\": \"Priority\",\n      \"crm_followup_time\": 1788307200,\n      \"crm_lead_created_at\": 1788134400,\n      \"reprocess\": 0\n    }\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://anthropod.in/api/v2/call_analytics/batch/', [
  'body' => '{
  "service_id": "SALES",
  "data": [
    {
      "id": "call_demo_001",
      "customer_id": "customer_demo_001",
      "employee_id": "agent_demo_001",
      "call_time": 1788220800,
      "call_record_link": "https://recordings.example/call_demo_001.mp3",
      "call_answer_status": "Connected",
      "call_direction": "Outbound",
      "lead_source": "Website",
      "lead_sub_source": "Contact form",
      "crm_lead_stage": "Follow-up",
      "crm_lead_sub_stage": "Callback requested",
      "crm_location": "Delhi",
      "customer_phone_number": "+919876543210",
      "campaign_id": "campaign_123",
      "campaign_batch_id": "batch_123",
      "tag": "Sales",
      "tag2": "New lead",
      "tag3": "Priority",
      "crm_followup_time": 1788307200,
      "crm_lead_created_at": 1788134400,
      "reprocess": 0
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <accountApiKey>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://anthropod.in/api/v2/call_analytics/batch/");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <accountApiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"service_id\": \"SALES\",\n  \"data\": [\n    {\n      \"id\": \"call_demo_001\",\n      \"customer_id\": \"customer_demo_001\",\n      \"employee_id\": \"agent_demo_001\",\n      \"call_time\": 1788220800,\n      \"call_record_link\": \"https://recordings.example/call_demo_001.mp3\",\n      \"call_answer_status\": \"Connected\",\n      \"call_direction\": \"Outbound\",\n      \"lead_source\": \"Website\",\n      \"lead_sub_source\": \"Contact form\",\n      \"crm_lead_stage\": \"Follow-up\",\n      \"crm_lead_sub_stage\": \"Callback requested\",\n      \"crm_location\": \"Delhi\",\n      \"customer_phone_number\": \"+919876543210\",\n      \"campaign_id\": \"campaign_123\",\n      \"campaign_batch_id\": \"batch_123\",\n      \"tag\": \"Sales\",\n      \"tag2\": \"New lead\",\n      \"tag3\": \"Priority\",\n      \"crm_followup_time\": 1788307200,\n      \"crm_lead_created_at\": 1788134400,\n      \"reprocess\": 0\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <accountApiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "service_id": "SALES",
  "data": [
    [
      "id": "call_demo_001",
      "customer_id": "customer_demo_001",
      "employee_id": "agent_demo_001",
      "call_time": 1788220800,
      "call_record_link": "https://recordings.example/call_demo_001.mp3",
      "call_answer_status": "Connected",
      "call_direction": "Outbound",
      "lead_source": "Website",
      "lead_sub_source": "Contact form",
      "crm_lead_stage": "Follow-up",
      "crm_lead_sub_stage": "Callback requested",
      "crm_location": "Delhi",
      "customer_phone_number": "+919876543210",
      "campaign_id": "campaign_123",
      "campaign_batch_id": "batch_123",
      "tag": "Sales",
      "tag2": "New lead",
      "tag3": "Priority",
      "crm_followup_time": 1788307200,
      "crm_lead_created_at": 1788134400,
      "reprocess": 0
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://anthropod.in/api/v2/call_analytics/batch/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```