Skip to main content

Developer Domain APIs: Login, Click2Call, Transcript Fetch

This page documents the developer-domain flow to authenticate, create async click2call jobs, and poll transcript status using internal call IDs.

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

Developer APIs route prefix: /api/developer.

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/developer/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/developer/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/developer/calls/click2call

Create Click2Call Request

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

Functionality
  • Requires bearer access token.

Inputs

NameTypeDefaultDescription
Authorization*headerrequiredBearer <access_token>
customer_number*stringrequiredCustomer phone number, e.g. 919999999999.
agent_number*stringrequiredAgent phone number, e.g. 918888888888.

Outputs

StatusTypeDescription
200 OKapplication/jsonClick2Call request created and queued.
401 Unauthorizedapplication/jsonMissing or invalid token.
400 Bad Requestapplication/jsonInactive user or validation issues.

cURL

curl -X POST \
"https://developer.induslabs.io/api/developer/calls/click2call" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '{
"customer_number": "919999999999",
"agent_number": "918888888888"
}'

Success Response (200)

{
"status_code": 200,
"message": "Click2Call request created",
"error": null,
"data": {
"call_id": "call_ab12cd34ef56gh78",
"status": "queued"
}
}
GET/api/developer/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.

Inputs

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

Outputs

StatusTypeDescription
200 OKapplication/jsonTranscript pending or transcript ready 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/developer/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",
"transcript": null
}
}

Success: Transcript Ready (200)

{
"status_code": 200,
"message": "Transcript found",
"error": null,
"data": {
"call_id": "call_ab12cd34ef56gh78",
"transcript_status": "ready",
"transcript": {
"transcript_id": "67c7....",
"summary": "Call summary text",
"call_outcome": "Interested",
"history": [],
"createdAt": "2026-03-05T10:00:00Z",
"updatedAt": "2026-03-05T10:01:00Z"
}
}
}

Recommended Usage Flow

  1. Login to get access_token.
  2. Create click2call request and store call_id.
  3. Poll transcript endpoint every 5-10 seconds until transcript_status = ready.

End-to-End Curl Flow (Quick Copy)

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

LOGIN_RESP=$(curl -s -X POST "$BASE_URL/api/developer/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/developer/calls/click2call" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{"customer_number":"919999999999","agent_number":"918888888888"}')

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

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

Notes

  • Transcript endpoint may return 200 with transcript: null while processing; this is expected.
  • Keep tokens secure; do not expose them in frontend logs.