Skip to main content

Developer Domain APIs: Login, Click2Call, Recent Logs, Transcript Fetch

This page documents the Click2Call API flow to authenticate, create async click2call jobs, receive callback events, list recent call logs, and fetch transcript status using internal call IDs.

Base URL
  • Production: https://developer.induslabs.io

Click2Call API route prefix: /api.

Common Response Envelope
{
"status_code": 200,
"message": "string or null",
"error": "string/object or null",
"data": {}
}

Auth/dependency failures may return FastAPI default errors like:

{ "detail": "Could not validate credentials" }
POST/api/login

Developer Login

Authenticate a verified active user and return access + refresh tokens.

Functionality
  • Public endpoint for email/password authentication.
  • Returns bearer access and refresh tokens on success.

Inputs

NameTypeDefaultDescription
email*stringrequiredUser email address.
password*stringrequiredUser password.

Outputs

StatusTypeDescription
200 OKapplication/jsonLogin successful with access and refresh tokens.
400 Bad Requestapplication/jsonIncorrect credentials, inactive user, or unverified user.

cURL

curl -X POST \
"https://developer.induslabs.io/api/login" \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "your_password"
}'

Success Response (200)

{
"status_code": 200,
"message": "Login successful",
"error": null,
"data": {
"access_token": "<jwt_access_token>",
"refresh_token": "<jwt_refresh_token>",
"token_type": "bearer"
}
}
POST/api/calls/click2call

Create Click2Call Request

Create a click2call job for authenticated user. Call is queued and processed asynchronously.

Functionality
  • Requires bearer access token.
  • For provider Click2Call, did is required. The backend sends the call to the provider in the background.
  • If callback_url is provided, the backend posts call and transcript lifecycle events to that URL after provider updates arrive.
  • If callback_url is not provided, use the recent logs and transcript endpoints to poll status.

Inputs

NameTypeDefaultDescription
Authorization*headerrequiredBearer <access_token>
customer_number*stringrequiredCustomer phone number, e.g. 919999999999.
agent_number*stringrequiredAgent phone number, e.g. 918888888888.
didstringrequired for provider flowCaller DID/provider number used to place the Click2Call request.
callback_urlurloptionalPublic webhook URL that receives backend POST callbacks for this call.
transcriptbooleanfalseSet true to process recording transcript after the provider call-log callback arrives.
transcript_languagestringnullOptional transcript language. If omitted, the default hi-en transcription flow is used.
agent_configobject{}Optional config for AGT_ voice-agent calls. Ignored for normal provider phone-number flow.

Outputs

StatusTypeDescription
200 OKapplication/jsonClick2Call request created and queued.
401 Unauthorizedapplication/jsonMissing or invalid token.
422 Unprocessable Entityapplication/jsondid is missing for provider flow, callback_url is invalid, or request validation failed.
400 Bad Requestapplication/jsonInactive user or validation issues.

cURL

curl -X POST \
"https://developer.induslabs.io/api/calls/click2call" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '{
"customer_number": "919999999999",
"agent_number": "918888888888",
"did": "919484956750",
"callback_url": "https://example.com/webhooks/indus/click2call",
"transcript": true,
"transcript_language": "hi"
}'

Success Response (200)

{
"status_code": 200,
"message": "Click2Call request created",
"error": null,
"data": {
"call_id": "call_ab12cd34ef56gh78",
"status": "queued",
"did": "919484956750",
"callback_url": "https://example.com/webhooks/indus/click2call",
"transcript": true,
"transcript_language": "hi"
}
}
GET/api/calls/recent

Get Recent Click2Call Logs

Fetch paginated Click2Call records for the authenticated user with filters for call status, transcript status, phone numbers, DID, and date range.

Functionality
  • Requires bearer access token.
  • Use this endpoint to monitor many calls without polling every call_id individually.
  • When transcript_status is ready, each call can include transcript data. Otherwise transcript is null.
  • recording and recording_url are signed recording URLs when available. Before provider callback or upload, they can be pending.

Inputs

NameTypeDefaultDescription
Authorization*headerrequiredBearer <access_token>
statusquery stringoptionalExact call status filter, e.g. queued, completed, failed, Answered.
call_typequery stringoptionalExact call type filter, e.g. C2C, outbound, agent_telephony.
transcript_statusquery stringoptionalFilter by pending, processing, ready, disabled, or failed.
customer_numberquery stringoptionalCase-insensitive partial match on customer number.
agent_numberquery stringoptionalCase-insensitive partial match on agent number or AGT_ id.
didquery stringoptionalCase-insensitive partial match on DID.
date_fromISO datetimeoptionalReturn records created at or after this date. Z timezone is accepted.
date_toISO datetimeoptionalReturn records created at or before this date. Z timezone is accepted.
limitinteger20Page size. Must be between 1 and 200.
pageinteger1Page number. Must be 1 or higher.

Outputs

StatusTypeDescription
200 OKapplication/jsonPaginated recent Click2Call records.
401 Unauthorizedapplication/jsonMissing or invalid token.
422 Unprocessable Entityapplication/jsonInvalid pagination or date filter.

cURL

curl -X GET \
"https://developer.induslabs.io/api/calls/recent?limit=10&page=1&transcript_status=ready" \
-H "Authorization: Bearer <access_token>"

Success Response (200)

{
"status_code": 200,
"message": "Recent call logs fetched",
"error": null,
"data": {
"total": 1,
"page": 1,
"limit": 10,
"has_more": false,
"filters": {
"status": null,
"call_type": null,
"transcript_status": "ready",
"customer_number": null,
"agent_number": null,
"did": null,
"date_from": null,
"date_to": null
},
"calls": [
{
"call_id": "call_ab12cd34ef56gh78",
"status": "completed",
"customer_number": "919999999999",
"agent_number": "918888888888",
"did": "919484956750",
"duration": "52",
"answer_duration": "48",
"call_type": "C2C",
"transcript_enabled": true,
"transcript_status": "ready",
"recording": "https://signed-recording-url",
"recording_url": "https://signed-recording-url",
"transcript": {
"summary": "Call summary text",
"call_outcome": "Interested",
"history": []
},
"created_at": "2026-04-14T06:50:00Z",
"updated_at": "2026-04-14T06:52:00Z"
}
]
}
}
GET/api/calls/{call_id}/transcript

Get Click2Call Transcript by Call ID

Fetch transcript metadata/content for a previously created click2call request.

Functionality
  • Requires bearer access token.
  • Polling may return transcript: null with transcript_status: pending while processing.
  • If processing fails, the API still returns 200 with transcript_status: failed and the failure reason in data.error.
  • Phone numbers are masked in this endpoint response.

Inputs

NameTypeDefaultDescription
Authorization*headerrequiredBearer <access_token>
call_id*pathrequiredCall ID returned by click2call endpoint.

Outputs

StatusTypeDescription
200 OKapplication/jsonTranscript pending, ready, disabled, or failed payload.
403 Forbiddenapplication/jsonUser is not authorized for this call.
404 Not Foundapplication/jsoncall_id not found.
401 Unauthorizedapplication/jsonMissing or invalid token.

cURL

curl -X GET \
"https://developer.induslabs.io/api/calls/call_ab12cd34ef56gh78/transcript" \
-H "Authorization: Bearer <access_token>"

Success: Transcript Not Ready (200)

{
"status_code": 200,
"message": "Transcript not available yet",
"error": null,
"data": {
"call_id": "call_ab12cd34ef56gh78",
"transcript_status": "pending",
"customer_number": "xxxxx9999999",
"agent_number": "xxxxx8888888",
"duration": null,
"recording": "pending",
"transcript": null
}
}

Success: Transcript Ready (200)

{
"status_code": 200,
"message": "Transcript found",
"error": null,
"data": {
"call_id": "call_ab12cd34ef56gh78",
"transcript_status": "ready",
"customer_number": "xxxxx9999999",
"agent_number": "xxxxx8888888",
"duration": "52",
"recording": "https://signed-recording-url",
"transcript": {
"transcript_id": "67c7....",
"summary": "Call summary text",
"call_outcome": "Interested",
"history": [],
"createdAt": "2026-03-05T10:00:00Z",
"updatedAt": "2026-03-05T10:01:00Z"
}
}
}

Success: Transcript Failed (200)

{
"status_code": 200,
"message": "Transcript processing failed",
"error": null,
"data": {
"call_id": "call_ab12cd34ef56gh78",
"transcript_status": "failed",
"customer_number": "xxxxx9999999",
"agent_number": "xxxxx8888888",
"duration": "52",
"recording": "https://signed-recording-url",
"transcript": null,
"error": "Client error '401 Unauthorized' for url 'https://voice.induslabs.io/v1/audio/transcribe/diarize'"
}
}

How Click2Call Callbacks Work

callback_url is your webhook endpoint. When you pass it in the create request, the backend sends POST requests to that URL as the call moves through completion and transcript states.

Callback sequence
  1. Your server calls POST /api/calls/click2call with callback_url.
  2. The API returns call_id immediately. Store it.
  3. The backend sends the outbound call request to the provider.
  4. The provider later calls the backend with call status and recording details.
  5. The backend stores the recording and starts transcript processing when transcript is true.
  6. The backend POSTs lifecycle events to your callback_url.
Important behavior
  • Your callback_url must be publicly reachable from the backend. Do not use localhost for production calls.
  • The callback is sent in the background. Your create request does not wait for the call, recording, or transcript.
  • The callback data object uses the same compact shape as GET /api/calls/{call_id}/transcript.
  • Return a 2xx response from your webhook to mark the event as delivered.
  • If no callback_url is supplied, no webhook is sent. Use GET /api/calls/recent or transcript polling.

Callback Events

EventMeaning
call.completedThe call has reached a completed terminal state and call-log data was stored.
call.failedThe call failed to connect or the provider reported a failed terminal state.
transcript.readyRecording transcript processing completed successfully.
transcript.failedTranscript processing failed. The failure reason is sent in top-level error and data.error.
transcript.disabledtranscript was false, so transcript processing was skipped.

Callback Payload: Call Completed

{
"status_code": 200,
"message": "Call completed",
"error": null,
"event": "call.completed",
"data": {
"call_id": "call_ab12cd34ef56gh78",
"transcript_status": "processing",
"customer_number": "xxxxx9999999",
"agent_number": "xxxxx8888888",
"duration": "52",
"recording": "https://signed-recording-url",
"transcript": null
}
}

Callback Payload: Transcript Ready

{
"status_code": 200,
"message": "Transcript ready",
"error": null,
"event": "transcript.ready",
"data": {
"call_id": "call_ab12cd34ef56gh78",
"transcript_status": "ready",
"customer_number": "xxxxx9999999",
"agent_number": "xxxxx8888888",
"duration": "52",
"recording": "https://signed-recording-url",
"transcript": {
"transcript_id": "67c7....",
"summary": "Call summary text",
"call_outcome": "Interested",
"history": [],
"createdAt": "2026-03-05T10:00:00Z",
"updatedAt": "2026-03-05T10:01:00Z"
}
}
}

Callback Payload: Transcript Failed

{
"status_code": 500,
"message": "Transcript processing failed",
"error": "Client error '401 Unauthorized' for url 'https://voice.induslabs.io/v1/audio/transcribe/diarize'",
"event": "transcript.failed",
"data": {
"call_id": "call_ab12cd34ef56gh78",
"transcript_status": "failed",
"customer_number": "xxxxx9999999",
"agent_number": "xxxxx8888888",
"duration": "52",
"recording": "https://signed-recording-url",
"transcript": null,
"error": "Client error '401 Unauthorized' for url 'https://voice.induslabs.io/v1/audio/transcribe/diarize'"
}
}

Recommended Usage Flow

  1. Login to get access_token.
  2. Create click2call request with did, optional callback_url, and transcript: true when transcript is needed.
  3. Store call_id from the create response.
  4. Use callbacks as the primary async notification path when callback_url is configured.
  5. Use GET /api/calls/recent to list and filter many calls efficiently.
  6. Use GET /api/calls/{call_id}/transcript when you need a single call transcript payload.

End-to-End Curl Flow (Quick Copy)

BASE_URL="https://developer.induslabs.io"

LOGIN_RESP=$(curl -s -X POST "$BASE_URL/api/login" \
-H "Content-Type: application/json" \
-d '{"email":"user@example.com","password":"your_password"}')

ACCESS_TOKEN=$(echo "$LOGIN_RESP" | jq -r '.data.access_token')

CALL_RESP=$(curl -s -X POST "$BASE_URL/api/calls/click2call" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"customer_number":"919999999999",
"agent_number":"918888888888",
"did":"919484956750",
"callback_url":"https://example.com/webhooks/indus/click2call",
"transcript":true,
"transcript_language":"hi"
}')

CALL_ID=$(echo "$CALL_RESP" | jq -r '.data.call_id')

curl -s -X GET "$BASE_URL/api/calls/recent?limit=10&page=1" \
-H "Authorization: Bearer $ACCESS_TOKEN"

curl -s -X GET "$BASE_URL/api/calls/$CALL_ID/transcript" \
-H "Authorization: Bearer $ACCESS_TOKEN"

Notes

  • Transcript endpoint may return 200 with transcript: null while processing; this is expected.
  • Transcript failures return 200 with transcript_status: failed and the detailed reason in data.error.
  • Provider phone-number Click2Call requires did.
  • The recent logs API is better than per-call polling when you manage multiple concurrent calls.
  • Keep tokens secure; do not expose them in frontend logs.