Skip to main content
GET
https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1
/
get-call
curl -X POST https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1/get-call \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"call_id": "7f3d8e00-a1b2-4c3d-9e4f-567890abcdef"}'
{
  "id": "7f3d8e00-a1b2-4c3d-9e4f-567890abcdef",
  "agent_id": "550e8400-e29b-41d4-a716-446655440000",
  "from_number": "+16045551234",
  "to_number": "+14155551234",
  "direction": "outbound",
  "status": "completed",
  "duration": 125,
  "recording_url": "https://storage.example.com/recordings/abc123.wav?token=xyz",
  "transcript": "Agent: Hello, this is Sarah from Acme Dental. I'm calling to confirm your appointment tomorrow at 2pm.\n\nCaller: Yes, I'll be there. Thank you for the reminder.",
  "transcript_segments": [
    {
      "speaker": "agent",
      "text": "Hello, this is Sarah from Acme Dental. I'm calling to confirm your appointment tomorrow at 2pm.",
      "start_time": 0.5,
      "end_time": 5.2
    },
    {
      "speaker": "caller",
      "text": "Yes, I'll be there. Thank you for the reminder.",
      "start_time": 5.8,
      "end_time": 8.3
    }
  ],
  "sentiment": "positive",
  "call_summary": "Appointment confirmation call. Customer confirmed their dental appointment for tomorrow at 2pm.",
  "metadata": {
    "customer_id": "cust_123",
    "campaign": "appointment_reminder"
  },
  "started_at": "2024-01-15T10:30:15Z",
  "ended_at": "2024-01-15T10:32:20Z",
  "created_at": "2024-01-15T10:30:00Z"
}
Get detailed information about a call, including its status, transcript, summary, and recording URL.

Request Body

call_id
string
required
The unique identifier of the call to retrieve.

Response

id
string
Unique call identifier.
agent_id
string
The agent that handled this call.
from_number
string
The phone number that made the call.
to_number
string
The destination phone number.
direction
string
Either inbound or outbound.
status
string
Final call status: completed, busy, no-answer, failed, or canceled.
duration
integer
Call duration in seconds.
recording_url
string
Signed URL to download the call recording. Expires after 1 hour.
transcript
string
Full transcript of the conversation.
transcript_segments
array
Timestamped transcript segments with speaker identification.
[
  {
    "speaker": "agent",
    "text": "Hello, this is Sarah from Acme Dental.",
    "start_time": 0.5,
    "end_time": 3.2
  },
  {
    "speaker": "caller",
    "text": "Hi Sarah, I'm calling about my appointment.",
    "start_time": 3.5,
    "end_time": 6.1
  }
]
sentiment
string
AI-analyzed call sentiment: positive, neutral, or negative.
call_summary
string
AI-generated summary of the call.
metadata
object
Custom metadata attached when the call was created.
started_at
string
When the call was answered.
ended_at
string
When the call ended.
curl -X POST https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1/get-call \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"call_id": "7f3d8e00-a1b2-4c3d-9e4f-567890abcdef"}'
{
  "id": "7f3d8e00-a1b2-4c3d-9e4f-567890abcdef",
  "agent_id": "550e8400-e29b-41d4-a716-446655440000",
  "from_number": "+16045551234",
  "to_number": "+14155551234",
  "direction": "outbound",
  "status": "completed",
  "duration": 125,
  "recording_url": "https://storage.example.com/recordings/abc123.wav?token=xyz",
  "transcript": "Agent: Hello, this is Sarah from Acme Dental. I'm calling to confirm your appointment tomorrow at 2pm.\n\nCaller: Yes, I'll be there. Thank you for the reminder.",
  "transcript_segments": [
    {
      "speaker": "agent",
      "text": "Hello, this is Sarah from Acme Dental. I'm calling to confirm your appointment tomorrow at 2pm.",
      "start_time": 0.5,
      "end_time": 5.2
    },
    {
      "speaker": "caller",
      "text": "Yes, I'll be there. Thank you for the reminder.",
      "start_time": 5.8,
      "end_time": 8.3
    }
  ],
  "sentiment": "positive",
  "call_summary": "Appointment confirmation call. Customer confirmed their dental appointment for tomorrow at 2pm.",
  "metadata": {
    "customer_id": "cust_123",
    "campaign": "appointment_reminder"
  },
  "started_at": "2024-01-15T10:30:15Z",
  "ended_at": "2024-01-15T10:32:20Z",
  "created_at": "2024-01-15T10:30:00Z"
}