Voice APIAvailable

Call API

Deliver OTP codes to users via automated voice calls. Send a phone number and OTP, and the recipient receives a voice call with each digit spoken individually for maximum clarity. No app installation or data connection required.

Overview

The Call API lets you deliver one-time passwords (OTPs) to your users via automated voice calls. It is designed for scenarios where SMS delivery is unreliable, the user is on a feature phone, or you need an additional layer of verification.

With a single API call, you provide the recipient's phone number and the OTP code. The service places an outbound call and reads each digit individually so the user can easily copy the code.

Works on Any Phone

Feature phones, smartphones, and landlines — no app needed.

Digit-by-Digit Clarity

Each digit spoken individually to avoid confusion between similar numbers.

Real-Time Tracking

Monitor call status, delivery rates, and daily analytics from the dashboard.

ℹ️
API Base URLAll API endpoints are relative to https://APIURL.tetrax.in/v1.

Authentication

The Call API uses API key authentication. You must include your trx_call_* API key in the x-api-key header of every request.

Getting Your API KeyGenerate a Call API key from the Applications page in the Tetrax dashboard. Create an application with Call capability and copy the trx_call_* key.
x-api-key: trx_call_your_key_here

API Key Types

trx_call_*Used for sending OTP calls. Include in x-api-key header.
JWT Bearer TokenUsed for dashboard operations (view history, analytics). Include as Authorization: Bearer <token>.

Quickstart

Send your first OTP voice call in under a minute. Replace the API key and phone number with your own values.

curl -X POST https://APIURL.tetrax.in/v1/call/otp \
  -H "Content-Type: application/json" \
  -H "x-api-key: trx_call_your_key" \
  -d '{
    "phone": "+919876543210",
    "otp": "4324"
  }'
{
  "success": true,
  "callId": "call_1712345678",
  "message": "OTP voice call initiated successfully",
  "call": {
    "id": 1,
    "phone": "+919876543210",
    "otp": "4324",
    "status": "initiated",
    "called_at": "2026-07-23T12:00:00.000Z"
  }
}
ℹ️
What happens next?The recipient's phone will ring. When they answer, they will hear each digit of the OTP spoken individually. The call ends automatically after delivery. Use GET /v1/call/calls to check delivery status.

API Endpoints

Send OTP via Voice Call

POST/v1/call/otp

Initiate an OTP voice call to the specified phone number. The recipient will receive a call and hear the OTP digits spoken individually.

{
  "phone": "+919876543210",
  "otp": "4324"
}

Response

{
  "success": true,
  "callId": "call_1712345678",
  "message": "OTP voice call initiated successfully",
  "call": {
    "id": 1,
    "phone": "+919876543210",
    "otp": "4324",
    "status": "initiated",
    "called_at": "2026-07-23T12:00:00.000Z"
  }
}

Request Parameters

ParameterTypeRequiredDescription
phonestringYesRecipient phone number with country code. E.g., +919876543210 for India.
otpstringYesThe OTP code to deliver. Must be a 3–10 digit numeric string.

View Call History

GET/v1/call/calls

Retrieve the OTP call history for your account. Supports pagination and status filtering.

GET /v1/call/calls?limit=50&status=completed

Response

{
  "calls": [
    {
      "id": 1,
      "phone": "+919876543210",
      "otp": "4324",
      "status": "completed",
      "duration_seconds": 45,
      "called_at": "2026-07-23T12:00:00.000Z",
      "error_message": null
    }
  ],
  "total": 128,
  "page": 1
}

Query Parameters

ParameterTypeRequiredDescription
limitintegerNoNumber of records to return. Default: 20. Max: 100.
statusstringNoFilter by call status: initiated, ringing, answered, completed, failed, busy, no-answer.
pageintegerNoPage number for pagination. Default: 1.

Get Analytics

GET/v1/call/analytics

Get OTP call analytics including total calls, success rate, and daily breakdown for the current month.

GET /v1/call/analytics

Response

{
  "summary": {
    "total_calls": 128,
    "successful_calls": 115,
    "failed_calls": 13,
    "success_rate": 89.84
  },
  "daily": [
    { "date": "2026-07-01", "total": 15, "successful": 14, "failed": 1 },
    { "date": "2026-07-02", "total": 22, "successful": 20, "failed": 2 }
  ]
}

Error Codes

The Call API uses standard HTTP status codes to indicate success or failure. Error responses include a descriptive message in the response body.

CodeDescription
200OK — OTP call initiated successfully.
400Bad Request — Missing or invalid parameters (phone, otp). Check that phone includes country code and OTP is 3–10 digits.
401Unauthorized — Missing or invalid API key. Include the x-api-key header with a valid trx_call_ key.
403Forbidden — The API key does not have Call permissions. Generate a trx_call_ key from the dashboard.
429Too Many Requests — Rate limit exceeded. Retry after the time specified in the Retry-After header.
402Payment Required — Insufficient wallet balance. Top up your prepaid wallet from the Billing page.
502Bad Gateway — The voice call provider failed to initiate the call. Retry the request.

Rate Limits

Rate limits protect the API from abuse and ensure fair usage across all customers. Limits are enforced per API key and configured per account (set per account — no monthly fee).

AccountMax Calls Per MinutePrice Per Call
StandardUp to 120 calls/min₹0.28/call
Enterprise300 calls/minCustom
⚠️
Rate Limit HeadersWhen a rate limit is exceeded, the API returns a 429 Too Many Requestsresponse. The response includes a Retry-Afterheader indicating the number of seconds to wait before retrying.

Webhooks

The Call API sends real-time call status updates to a webhook URL when the status of an OTP call changes. Webhooks allow you to track delivery without polling.

ℹ️
Webhook ConfigurationConfigure a webhook endpoint URL in your Tetrax dashboard settings to receive real-time call status updates. Tetrax will send POST requests to your endpoint whenever the status of an OTP call changes.

Webhook Events

EventDescription
initiatedCall has been queued and the provider is attempting to connect.
ringingThe recipient's phone is ringing.
answeredThe recipient answered the call. The OTP is being delivered.
completedThe call ended successfully after OTP delivery.
failedThe call could not be completed due to a provider error.
busyThe recipient's line was busy.
no-answerThe recipient did not answer the call.

Webhook Payload

{
  "call_id": "call_1712345678",
  "status": "completed",
  "duration": 45
}

Webhook Parameters

ParameterTypeDescription
call_idstringUnique identifier for the OTP call. Matches the callId returned by the send endpoint.
statusstringCurrent status of the call: initiated, ringing, answered, completed, failed, busy, or no-answer.
durationintegerCall duration in seconds. Only present for answered/completed calls.

Pricing & Rate Limits

The Call API uses prepaid wallet billing at a flat ₹0.28 per OTP call — no subscriptions, no monthly fees. Every account pays the same rate; each successful call deducts ₹0.28 from your wallet in real time.

Pay As You Go

One flat price
₹0.28 per OTP call

Same rate for every account — no subscriptions, no monthly fees. Top up your wallet and pay per call.

Rate limitUp to 120 calls/min
Higher limitsContact support to raise
ℹ️
Enterprise VolumesNeed higher limits or volume-based wallet rates? Contact us for enterprise rate limits and custom pricing.

📘 Integration Guide

New to the Call API? Follow our step-by-step setup guide with code examples in Node.js, Python, PHP, and Java.

View Guide →

Try it in the Dashboard

Test the Call API interactively from the OTP Playground in your dashboard.

Open Dashboard →

Was this page helpful?

Help us improve our documentation.