Calls

Ingest an externally completed call record

POST
/api/calls/ingest

Public ingestion endpoint for vendor-agnostic external calling systems to push completed call records into Tether. Authenticated via a user-scoped API key (Bearer token from GET /api/user/api-key) - does NOT use the standard JWT auth. Creates the same Contact / Conversation / Call / recording artifacts as the ElevenLabs post-call webhook. Idempotent on externalCallId. Uploads recordings (base64 MP3 or URL) to R2. Emits call_activity (contactId/conversationId only), call_ended, call_recording_ready, and fetch_messages socket events.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Vendor-agnostic completed-call payload. transcript, summary, and recording are required when status === "completed".

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/calls/ingest" \  -H "Content-Type: application/json" \  -d '{    "direction": "outbound",    "fromNumber": "+14165550100",    "toNumber": "+14165550199",    "duration": 154,    "status": "completed",    "transcript": [      {        "role": "agent",        "message": "Hi, this is Alex from Example Corp.",        "timestamp": 0.5      },      {        "role": "user",        "message": "Hey Alex.",        "timestamp": 2.8      }    ],    "summary": "Confirmed appointment for Friday at 2pm.",    "recording": "https://vendor.example/recordings/abc123.mp3",    "externalCallId": "vendor-call-abc123",    "agentName": "Alex (Example Agent)",    "callStartTime": "2026-05-15T09:10:00.000Z",    "aiCallSuccessful": "success",    "aiCost": 4101,    "aiLlmPrice": 0.0986894,    "aiSummaryTitle": "Friday 2pm appointment confirmed",    "aiTerminationReason": "Client disconnected: 1000",    "aiCharging": {      "llm_charge": 986,      "call_charge": 3115,      "llm_price": 0.0986894,      "dev_discount": false,      "is_burst": false,      "tier": "standard"    },    "aiEvaluationResults": {      "booking_confirmed": {        "criteria_id": "crit_1",        "result": "pass",        "rationale": "Customer confirmed Friday 2pm."      }    },    "aiDataCollection": [      {        "data_collection_id": "appointment_time",        "value": "Friday 2pm",        "json_schema": {          "type": "string",          "description": "Booked appointment time"        }      }    ],    "aiDynamicVariables": {      "caller_first_name": "Alex",      "system__caller_phone": "+14165550199"    },    "aiFeaturesUsage": {      "language_detection": true,      "profanity_filter": true    }  }'
{  "success": true,  "deduplicated": true,  "callId": "64f0a1b2c3d4e5f6a7b8cb00"}