# Nexyantra API reference Base URL: https://api.nexyantra.live/v1 Requests require your own API credentials. Never publish keys in documentation or URLs. This reference describes the documented API; consult the interactive documentation for request examples. ## Initiate Outbound Call `POST /v1/calls` Immediately dispatch an autonomous conversational AI phone call to a customer's mobile or landline number with injected CRM variables. - **agent_id** (string (UUID), required, body): Target voice agent UUID configured in your tenant. Determines the prompt, voice model, language, and behavior. - **phone** (string (E.164), required, body): Destination customer phone number with international country code. - **caller_id** (string (E.164), optional, body): Purchased carrier DID phone number to display as calling identity. If omitted, uses agent default DID. - **user_context** (object (JSON), optional, body): Dynamic CRM variables injected into the agent system prompt (e.g., customer_name, due_amount, account_id). - **dial** (boolean, optional, body): Whether to dispatch carrier dial command immediately (true) or register call session state only (false). ## List Call History `GET /v1/calls` Fetch paginated call records filtered by agent, campaign, telecom disposition, or epoch date range. Complies with zero transcript leak privacy standards. - **agent_id** (string (UUID), optional, query): Filter records dialed by a specific voice agent UUID. - **campaign_id** (string (UUID), optional, query): Filter records belonging to a specific batch campaign UUID. - **disposition** (string, optional, query): Filter by outcome: completed, answered, no_answer, busy, failed, voicemail. - **from_ts** (number (float), optional, query): Unix epoch timestamp in seconds — only calls dialed on or after this timestamp. - **to_ts** (number (float), optional, query): Unix epoch timestamp in seconds — only calls dialed on or before this timestamp. - **page** (integer, optional, query): Page number (1-indexed). - **page_size** (integer, optional, query): Number of items per page (1 to 200). ## Get Single Call Record `GET /v1/calls/{session_id}` Retrieve full call session details including duration, connection timestamps, and telecom disposition for a specific session. - **session_id** (string (UUID), required, path): Call session UUID returned when the call was initiated. ## Get Post-Call AI Intelligence `GET /v1/calls/{session_id}/analysis` Retrieve structured conversation intelligence: customer sentiment score, intent classification, call outcome success flag, and executive conversation summary. - **session_id** (string (UUID), required, path): Call session UUID. ## List Outbound Campaigns `GET /v1/campaigns` Retrieve all active, running, paused, or completed outbound batch calling campaigns configured for your organization. ## Get Campaign Detail & Live Stats `GET /v1/campaigns/{id}` Fetch real-time live lead status breakdown for a campaign (pending, dialing, connected, completed, failed, DNC, voicemail). - **id** (string (UUID), required, path): Campaign UUID. ## List Campaign Leads `GET /v1/campaigns/{id}/leads` Retrieve paginated list of leads assigned to a campaign with their current dialing progress, call outcome, attempts count, and custom metadata. - **id** (string (UUID), required, path): Campaign UUID. - **status** (string, optional, query): Filter: pending, held, dialing, in_call, completed, failed, retry, dnc, voicemail. - **page** (integer, optional, query): Page index (1-indexed). - **page_size** (integer, optional, query): Items per page (max 200). ## Push Batch Leads into Campaign `POST /v1/campaigns/{id}/leads` Programmatically push batches of up to 5,000 leads directly into an active dialing campaign from your CRM or lead acquisition webhook. - **id** (string (UUID), required, path): Campaign UUID to receive leads. - **leads** (array[object], required, body): Array of lead objects. Required field inside each object: phone (E.164). ## Tenant Analytics Overview `GET /v1/analytics/overview` Aggregate calling metrics across all calls: total volume, connected rate %, failure counts, average duration, and AI sentiment score. - **from_ts** (number, optional, query): Epoch timestamp in seconds for window start. - **to_ts** (number, optional, query): Epoch timestamp in seconds for window end. - **agent_id** (string, optional, query): Filter metrics by voice agent UUID. - **campaign_id** (string, optional, query): Filter metrics by campaign UUID. ## Daily Time Series Breakdown `GET /v1/analytics/daily` Day-by-day historical trend of call volume, connected calls, failure rate, and average conversation duration. - **days** (integer, optional, query): Number of past days to return (1 - 90). ## List Active Voice Agents `GET /v1/agents` List all configured AI voice agents for your tenant ready for dialing or inbound handling. ## List Assigned Phone Numbers `GET /v1/numbers` List all telecommunication DID phone numbers assigned to your tenant and their associated voice agents.