Skip to Content
Builder Docs
CRM, APIs & Knowledge Bases

Talkar Service API Reference

Programmatically launch outbound calls, poll or SSE-stream live transcripts, read wallet/transactions, upload S3 files, integrate public web embeds, and call Talkar Automation APIs.

Talkar Service API Reference

Use these APIs when embedding Talkar inside a client's application, CRM, web portal, or backend automation pipeline. All interactive playgrounds below connect through the docs proxy—never paste live production secrets into untrusted shared environments.


Authentication Headers

API SurfaceHeader / TokenWho Calls It
Public Agent Trigger & Status (/api/v1/public/agent/...)X-API-Key: <org_api_key> (strictly required; /stream takes ?api_key=...)External backends, CRMs, and browser SSE listeners launching outbound runs or streaming live turns.
Authenticated Workflow, Campaign & Wallet API (/api/v1/...)X-API-Key: <org_api_key> (or Authorization: Bearer ...)Querying run history (/runs/all), reading wallet/usage, managing embed tokens, testing tools/KB, or managing campaigns.
Web Embed Public Routes (/api/v1/public/embed/...)token (POST /init body or GET /config/{token} path) & {session_token}Unauthenticated browser widgets scoped strictly to a published workflow's token and allowed_domains.
Talkar Automation Platform API (/automation/v1/...)X-Talkar-API-Key: tkr_auto_...Internal/partner billing & account ops (n8n, admin automations) on https://billing.talkar.in/automation/v1. (Uses the numeric workspace/engine org ID in /customers/{org_id} routes.)

Pre-call admission & wallet gates

Live outbound calls check organization status (agent_building allows up to 2 free webrtc/textchat/mock playground sessions while blocking PSTN), provisioning completion, sub-org monthly spending caps, fleet/sub-org concurrency limits, > ₹500 wallet floor, and worst-case concurrency reserve (concurrent_calls * ceil(max_duration / 60) * rate), returning HTTP 402 on quota rejection or 429 / 503 on engine concurrency rejection.


1. Trigger Outbound Calls Programmatically

You can initiate an automated outbound call via an API Trigger Node (trigger_path) (POST /api/v1/public/agent/{uuid}) or Workflow UUID (POST /api/v1/public/agent/workflow/{workflow_uuid}) for Published builds—or insert /test/ (POST /api/v1/public/agent/test/{uuid} and /test/workflow/{workflow_uuid}) to test the Latest Draft:

  • phone_number (required): E.164 destination phone number or SIP target.
  • initial_context (optional): Key-value dictionary merged into initial_context ({{customer_name}}, {{order_id}}, etc.).
  • Response: Returns { "status": "initiated", "workflow_run_id": ..., "workflow_run_name": "WR-API-..." } (use workflow_run_id as {run_id} in monitoring routes).
Trigger an outbound call (published workflow)
curl -X POST "https://api.example.com/api/v1/public/agent/<trigger_uuid>" \
  -H "X-API-Key: <org_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+919876543210",
    "initial_context": {
      "customer_name": "Rohan Sharma",
      "order_id": "ORD-9182"
    }
  }'
POST
/api/v1/public/agent/{uuid}

Initiates an outbound call against the published workflow version targeted by an ACTIVE Trigger Node UUID.

Authorization

ApiKeyAuth
headerX-API-Key<token>

Organization-scoped API key for External Trigger & Live Monitoring endpoints.

Path Parameters

uuid*string

API Trigger Node UUID configured on the workflow canvas.

Request Body

application/json
  1. body
phone_number*string

Destination E.164 phone number or SIP address.

initial_context?

Custom key-value variables merged into initial_context before greeting.

telephony_configuration_id?integer

Optional specific org telephony configuration ID. Defaults to org default outbound trunk.

Response Body

Call initiated

application/json
  1. response
status?string
workflow_run_id?integer
workflow_run_name?string
Example Request
curl -X POST 'https://api.talkar.in/api/v1/public/agent/string' \  -H 'Content-Type: application/json' \  -d '{  "phone_number": "string"}'
Example Response
{  "status": "string",  "workflow_run_id": 0,  "workflow_run_name": "string"}
POST
/api/v1/public/agent/workflow/{workflow_uuid}

Initiates an outbound call directly by Workflow UUID (uses published version). Use POST /api/v1/public/agent/test/workflow/{workflow_uuid} to run against latest draft.

Authorization

ApiKeyAuth
headerX-API-Key<token>

Organization-scoped API key for External Trigger & Live Monitoring endpoints.

Path Parameters

workflow_uuid*string

Request Body

application/json
  1. body
phone_number*string
initial_context?
telephony_configuration_id?integer

Response Body

Call initiated

Example Request
curl -X POST 'https://api.talkar.in/api/v1/public/agent/workflow/string' \  -H 'Content-Type: application/json' \  -d '{  "phone_number": "string"}'
Example Response
Empty

2. Monitor Call Runs, Poll/Stream Transcripts & Download Artifacts

After launching a call (saving workflow_run_id), you can:

  1. Check completion, disposition & extracted data via GET /api/v1/public/agent/run/{run_id} (X-API-Key header — returns { run_id, is_completed, extracted_data, call_disposition }). (For full recording/transcript URLs, logs, cost_info, and QA annotations, call GET /api/v1/workflow/{workflow_id}/runs/{run_id}.)
  2. Poll live or completed turns (JSON) via GET /api/v1/public/agent/run/{run_id}/live-transcript (X-API-Key header — returns { run_id, is_live, turns }).
  3. Stream live call events via SSE (text/event-stream) via GET /api/v1/public/agent/run/{run_id}/stream?api_key=<org_api_key> (passes api_key as a query parameter for browser EventSource compatibility; emits connected, turn, agent_start, agent_done, ended, timeout, error with 1s heartbeats).
  4. Download recordings or transcripts (recording, transcript, user_recording, bot_recording) using public run token links (GET /api/v1/public/download/workflow/{token}/{artifact_type}, returns 302 redirect to a 1-hour signed URL).
Consume live SSE transcript turns in browser / Node
// Frames arrive as `data: <json>\n\n` (no named `event:` header) with `: heartbeat` ticks every 1s.
const stream = new EventSource(
  `https://api.example.com/api/v1/public/agent/run/${runId}/stream?api_key=${encodeURIComponent(apiKey)}`
);

stream.onmessage = (event) => {
  const payload = JSON.parse(event.data);
  if (payload.type === 'connected') console.log('Subscribed to run', payload.run_id);
  if (payload.type === 'turn') console.log(`[${payload.role}]`, payload.text, { final: payload.final });
  if (payload.type === 'ended' || payload.type === 'timeout' || payload.type === 'error') {
    console.warn('Stream closed:', payload);
    stream.close();
  }
};

SSE stream auth & timeout behavior

/run/{run_id}/stream checks api_key inside the SSE generator: an invalid key returns HTTP 200 and immediately emits {"type": "error", "message": "Invalid API key"}. If no conversation events start within 30s, the server emits {"type": "timeout"} and closes cleanly.

Querying & Filtering Run History (/runs/all & /{workflow_id}/runs)

List paginated runs across your organization (GET /api/v1/workflow/runs/all) or scoped to a single workflow (GET /api/v1/workflow/{workflow_id}/runs) with optional page, limit, sort_by ("duration" or "created_at"), sort_order ("asc" | "desc", default "desc"), and filters (URL-encoded JSON array):

attributeRequired typevalue JSON ShapeBehavior / Scope
dateRange"dateRange"{"from": "<ISO-8601>", "to": "<ISO-8601>"}Filters created_at (from and/or to optional)
dispositionCode"multiSelect"{"codes": ["user_qualified", "completed"]}Matches gathered_context.mapped_call_disposition
duration"numberRange"{"min": 10, "max": 300}Filters usage_info.call_duration_seconds (min and/or max)
status"radio"{"status": "completed"}"completed" or "in_progress" (is_completed)
tokenUsage"numberRange"{"min": 0.01, "max": 2.5}Filters run usage cost
workflowId"number"{"value": 103}/runs/all only — filters by workflow_id
Query completed runs over 30s for workflow 103
FILTERS='[{"attribute":"workflowId","type":"number","value":{"value":103}},{"attribute":"status","type":"radio","value":{"status":"completed"}},{"attribute":"duration","type":"numberRange","value":{"min":30}}]'

curl -G "https://api.example.com/api/v1/workflow/runs/all" \
  -H "X-API-Key: <org_api_key>" \
  --data-urlencode "page=1" \
  --data-urlencode "limit=25" \
  --data-urlencode "sort_by=duration" \
  --data-urlencode "sort_order=desc" \
  --data-urlencode "filters=${FILTERS}"

(Malformed JSON returns HTTP 400, and disallowed filter attributes return HTTP 403. List responses set logs: null and annotations: null; call GET /api/v1/workflow/{workflow_id}/runs/{run_id} for full transcripts, logs, and QA annotations.)

GET
/api/v1/public/agent/run/{run_id}

Authorization

ApiKeyAuth
headerX-API-Key<token>

Organization-scoped API key for External Trigger & Live Monitoring endpoints.

Path Parameters

run_id*integer

Response Body

Extraction & disposition payload

application/json
  1. response
run_id?integer
is_completed?boolean
extracted_data?
call_disposition?string
Example Request
curl -X GET 'https://api.talkar.in/api/v1/public/agent/run/0'
Example Response200
{  "run_id": 0,  "is_completed": true,  "extracted_data": {},  "call_disposition": "string"}
GET
/api/v1/public/agent/run/{run_id}/live-transcript

JSON polling endpoint returning current finalized turns while live or persisted turns after completion. For Server-Sent Events (SSE), use /api/v1/public/agent/run/{run_id}/stream?api_key=...

Authorization

ApiKeyAuth
headerX-API-Key<token>

Organization-scoped API key for External Trigger & Live Monitoring endpoints.

Path Parameters

run_id*integer

Response Body

Ordered speaker turns

application/json
  1. response
run_id?integer
is_live?boolean
turns?array<>
Example Request
curl -X GET 'https://api.talkar.in/api/v1/public/agent/run/0/live-transcript'
Example Response200
{  "run_id": 0,  "is_live": true,  "turns": [    {      "role": "agent",      "text": "string",      "timestamp": "2019-08-24T14:15:22Z"    }  ]}
GET
/api/v1/public/agent/run/{run_id}/stream

Streams real-time SSE events (connected, turn, agent_start, agent_done, ended, timeout, error) with 1s heartbeats. Uses the api_key query parameter for browser EventSource compatibility.

Path Parameters

run_id*integer

Query Parameters

api_key*string

Organization X-API-Key passed as query param for EventSource clients.

Response Body

SSE event stream (text/event-stream)

Example Request
curl -X GET 'https://api.talkar.in/api/v1/public/agent/run/0/stream?api_key=string'
Example Response
Empty
GET
/api/v1/public/download/workflow/{token}/{artifact_type}

No auth header required; authorized via WorkflowRun public_access_token. Returns 302 redirect to signed URL (1 hour TTL).

Path Parameters

token*string
artifact_type*string
Value in"recording""transcript""user_recording""bot_recording"

Query Parameters

inline?boolean
Defaultfalse

Response Body

Redirect to signed artifact URL

Example Request
curl -X GET 'https://api.talkar.in/api/v1/public/download/workflow/string/recording'
Example Response
Empty

3. Public Web Embeds (Voice or Text Chat)

Client websites can embed a Published Talkar workflow (settings.widgetType configured as voice or chat, returned as top-level widget_type from /init) with allowed_domains, floating/inline/headless modes, and usage_limit caps (see the step-by-step Public Web Embeds Guide for code samples, 409 revision locking, and WebRTC signaling):

  1. Fetch origin-validated widget config (GET /api/v1/public/embed/config/{token}).
  2. Initialize a 1-hour session (POST /api/v1/public/embed/init, passing {"token": "...", "context_variables": {...}} in the JSON body).
  3. In chat mode, exchange turns via POST /api/v1/public/embed/chat/{session_token}/messages (4000-char limit, optional expected_revision optimistic lock returning 409, 50-turn limit returning 429), inspect state via GET /api/v1/public/embed/chat/{session_token}, or close via POST .../end. Public embed responses automatically redact internal prompts, raw errors, and system context. (WebRTC embeds fetch ICE servers via GET /api/v1/public/embed/turn-credentials/{session_token}.)
GET
/api/v1/public/embed/config/{token}

Path Parameters

token*string

Response Body

Widget configuration

Example Request
curl -X GET 'https://api.talkar.in/api/v1/public/embed/config/string'
Example Response
Empty
POST
/api/v1/public/embed/init

Request Body

application/json
  1. body
token*string
context_variables?

Response Body

Returns session_token (1h TTL), workflow_run_id, config, widget_type, and initial chat_session for chat widgets

Example Request
curl -X POST 'https://api.talkar.in/api/v1/public/embed/init' \  -H 'Content-Type: application/json' \  -d '{  "token": "string"}'
Example Response
Empty
POST
/api/v1/public/embed/chat/{session_token}/messages

Path Parameters

session_token*string

Request Body

application/json
  1. body
text*string
Length1 <= length <= 4000
expected_revision?integer

Optimistic concurrency revision check

Response Body

Updated PublicEmbedChatSessionResponse

Example Request
curl -X POST 'https://api.talkar.in/api/v1/public/embed/chat/string/messages' \  -H 'Content-Type: application/json' \  -d '{  "text": "string"}'
Example Response
Empty

4. Org Wallet, Presigned Uploads & Platform Automation API

Organization Wallet & S3 File Helpers (/api/v1)

Authenticated via X-API-Key or Bearer token:

  • Wallet & Ledger: GET /api/v1/wallet, GET /api/v1/wallet/balance, and GET /api/v1/wallet/transactions?page=1&limit=20&type=...
  • Presigned S3 Uploads/Downloads (900s upload TTL): POST /api/v1/s3/presigned-document-url (onboarding PDF/PNG/JPG up to 20 MB), POST /api/v1/s3/presigned-upload-url (campaign .csv up to 10 MB), GET /api/v1/s3/signed-url (expires_in default 3600s), GET /api/v1/s3/file-metadata.

Platform & Automation API (https://billing.talkar.in/automation/v1)

Scope-gated (credit, deduct, wallet_read, customer_read, suspend, stats_read, notify) with X-Talkar-API-Key: tkr_auto_..., per-key RPM throttling (429), and audit logging:

ScopeEndpoints & Key Constraints
credit / deductPOST /customers/{org_id}/credit (0 < amount_rupees <= 100000, types credit/top_up/grant/manual_credit; auto-activates pending_deposit or zero_balance-suspended accounts when threshold met); POST /customers/{org_id}/deduct (amount_rupees > 0, no negative overdraft).
wallet_read / customer_readGET /customers/{org_id}/wallet, GET /wallet/overview, GET /customers/{org_id}, GET /customers
suspendPOST /customers/{org_id}/suspend (reason: zero_balance, policy_violation, fraud, other — cascades master -> sub-orgs), POST /customers/{org_id}/unsuspend (requires shared wallet > ₹500; restores zero_balance sub-orgs only)
stats_readGET /calls/stats (from_date/to_date max 90 days), GET /wallet/alerts
notifyPOST /customers/{org_id}/notify (JSON { "content": { "title", "body", "alert_type" }, "delivery": { "in_app_notification": bool, "send_email": bool } } — returns { "status": "skipped" } cleanly during pre-live building stages)

On this page