Nexyantra
v1.0
Read the complete API reference as plain Markdown
Production Gateway:https://api.nexyantra.live/v1
No key entered (Console tests 401 Unauthorized)
CALLS & SESSIONS
60 req / min per keyTenant Scoped

Initiate Outbound Call

POSThttps://api.nexyantra.live/v1/calls
Purpose & Architecture

Immediately dispatch an autonomous conversational AI phone call to a customer's mobile or landline number with injected CRM variables.

CRM & Business Use Cases

Instant lead qualification (under 15 seconds after webform submission in HubSpot/Salesforce), automated EMI and overdue payment collections reminders, delivery schedule confirmations, or post-service CSAT verification without human agent intervention.

Prerequisites & Constraints
  • Agent must be created and belong to the same tenant as your Bearer API key (cross-tenant calls return 403 Forbidden).
  • Destination phone number must be formatted in strict E.164 with international country code (e.g. +919876543210).
  • Compliant calling windows configured on the agent (e.g., TRAI 09:00 - 21:00 recipient local time) are strictly enforced. Calls placed outside allowed hours reject immediate dial with 409 Conflict.
  • Tenant account must have active carrier balance or minute quota.
Headers
HeaderTypeRequiredDescription
AuthorizationstringRequired *Bearer authentication token. Format: Bearer nxk_live_...
Constraint: Must be a valid active API key scoped to your tenant
Content-TypestringRequired *Payload serialization standard.
Constraint: Required for POST requests
Request Body Parameters
FieldTypeRequiredDescription & Formatting Guidelines
agent_idstring (UUID)Required *Target voice agent UUID configured in your tenant. Determines the prompt, voice model, language, and behavior.
Format: Valid active agent UUID
phonestring (E.164)Required *Destination customer phone number with international country code.
Format: +<country_code><number>, e.g. +919876543210
caller_idstring (E.164)OptionalPurchased carrier DID phone number to display as calling identity. If omitted, uses agent default DID.
Format: Must be assigned to tenant in Numbers section
user_contextobject (JSON)OptionalDynamic CRM variables injected into the agent system prompt (e.g., customer_name, due_amount, account_id).
Format: Key-value map of strings or numbers
dialbooleanOptionalWhether to dispatch carrier dial command immediately (true) or register call session state only (false).(Default: true)
Format: true | false
Response Attributes (201 OK)
session_idstring (UUID)

Unique call correlation ID used across telephony, webhooks, and analytics.

dialedboolean

Indicates whether the telecom carrier dial command was dispatched.

dial_resultobject

Carrier dispatch outcome containing carrier call_sid and initial queue status.

calling_windowobject

Contains enforcement status, whether the window is currently open, and next_open ISO timestamp.

Expected Error Codes & Handling
StatusReasonConditionResolution
400Bad RequestMalformed JSON payload or missing required body.Check JSON syntax and required fields.
401UnauthorizedMissing, invalid, or revoked Bearer API key.Supply header: Authorization: Bearer nxk_live_...
403ForbiddenThe agent_id specified belongs to a different company/tenant.Ensure agent was created under your tenant.
404Not FoundThe requested agent_id does not exist.Check /v1/agents for valid agent UUIDs.
409Calling Window ClosedCall attempt occurred outside compliant local business hours.Schedule call after next_open ISO timestamp.
422Validation ErrorInvalid phone number formatting or schema validation error.Ensure phone starts with + followed by country code.
429Rate Limit ExceededMore than 60 requests sent in a 60-second sliding window.Throttle requests or implement exponential backoff.
Interactive Runner
Get key in Settings
Leave blank to test 401 response
Request Payload (JSON)
Live editable JSON payload
Response:201 Sample
{
  "session_id": "sess_89ef412a-3b91-4e78-9a2c-f09b55231c89",
  "dialed": true,
  "dial_result": {
    "status": "queued",
    "call_sid": "CA9a88f72bc901e18"
  },
  "calling_window": {
    "enforced": true,
    "open_now": true
  }
}