> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a single call log by ID

> Returns the full call log including transcript and function calls.

Returns the full call log including transcript and function calls.

### Path parameters

<ParamField path="id" type="string (uuid)" required>
  Call log ID
</ParamField>

### Response

`CallLogDetailResponse`

<ResponseField name="call" type="CallLog" required>
  Full call record

  <Expandable title="CallLog">
    <ResponseField name="answered_by" type="AnsweredBy,null" />

    <ResponseField name="call_sid" type="string,null">
      Twilio call SID
    </ResponseField>

    <ResponseField name="created_at" type="string" required>
      When this record was created (ISO 8601)
    </ResponseField>

    <ResponseField name="direction" type="CallDirection" required>
      Direction of the call
    </ResponseField>

    <ResponseField name="duration_seconds" type="integer,null (int32)">
      Duration of the call in seconds
    </ResponseField>

    <ResponseField name="ended_at" type="string" required>
      When the call ended (ISO 8601)
    </ResponseField>

    <ResponseField name="error_message" type="string,null">
      Error message if call failed
    </ResponseField>

    <ResponseField name="escalated" type="boolean" required>
      Whether the call was escalated to a human
    </ResponseField>

    <ResponseField name="escalation_reason" type="string,null">
      Reason for escalation
    </ResponseField>

    <ResponseField name="from_number" type="string,null">
      Caller's phone number (E.164 format)
    </ResponseField>

    <ResponseField name="function_calls" type="FunctionCallEntry[]" required>
      Functions called during the conversation

      <Expandable title="FunctionCallEntry">
        <ResponseField name="arguments" type="object" required>
          Arguments passed to the function
        </ResponseField>

        <ResponseField name="duration_ms" type="integer,null (int64)">
          How long the function took to execute in milliseconds
        </ResponseField>

        <ResponseField name="name" type="string" required>
          Name of the function called
        </ResponseField>

        <ResponseField name="result" type="object">
          Result returned by the function
        </ResponseField>

        <ResponseField name="timestamp" type="string" required>
          When the function was called (ISO 8601)
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="id" type="string" required>
      Unique identifier for this call log
    </ResponseField>

    <ResponseField name="model" type="string,null">
      AI model used
    </ResponseField>

    <ResponseField name="outcome" type="CallOutcome,null" />

    <ResponseField name="recording_url" type="string,null">
      URL to the call recording (from Twilio)
    </ResponseField>

    <ResponseField name="started_at" type="string" required>
      When the call started (ISO 8601)
    </ResponseField>

    <ResponseField name="status" type="CallStatus" required>
      Current status of the call
    </ResponseField>

    <ResponseField name="stream_sid" type="string" required>
      Twilio stream SID
    </ResponseField>

    <ResponseField name="summary" type="string,null">
      LLM-generated summary of the call
    </ResponseField>

    <ResponseField name="system_prompt_key" type="string,null">
      System prompt key used
    </ResponseField>

    <ResponseField name="tenant_id" type="string" required>
      Tenant that owns this call
    </ResponseField>

    <ResponseField name="to_number" type="string,null">
      Called phone number (E.164 format)
    </ResponseField>

    <ResponseField name="transcript" type="TranscriptEntry[]" required>
      Full conversation transcript

      <Expandable title="TranscriptEntry">
        <ResponseField name="content" type="string" required>
          Content of the message
        </ResponseField>

        <ResponseField name="role" type="string" required>
          Role of the speaker: 'user', 'assistant', or 'system'
        </ResponseField>

        <ResponseField name="timestamp" type="string" required>
          When this message was spoken (ISO 8601)
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="updated_at" type="string" required>
      When this record was last updated (ISO 8601)
    </ResponseField>

    <ResponseField name="voice" type="string,null">
      Voice used for TTS
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="ok" type="boolean" required>
  Whether the request succeeded
</ResponseField>

### Status codes

| Code  | Meaning                        |
| ----- | ------------------------------ |
| `200` | Call log detail                |
| `401` | Unauthorized                   |
| `404` | Call log not found             |
| `500` | Internal server error          |
| `503` | Call logging is not configured |

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api.voice.stateset.com/api/v1/call-logs/{id}' \
    --header 'Authorization: Bearer YOUR_API_KEY'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "call": {
      "answered_by": "human",
      "call_sid": "CA1234567890abcdef1234567890abcdef",
      "created_at": "2024-01-15T10:30:00Z",
      "direction": "inbound",
      "duration_seconds": 142,
      "ended_at": "2024-01-15T10:32:22Z",
      "error_message": "WebSocket connection closed unexpectedly",
      "escalated": false,
      "escalation_reason": "Customer requested to speak with a human agent",
      "from_number": "+15555555678",
      "function_calls": [
        {
          "arguments": null,
          "duration_ms": null,
          "name": null,
          "result": null,
          "timestamp": null
        }
      ],
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "model": "gpt-4o-realtime-preview",
      "outcome": "answered",
      "recording_url": "https://api.twilio.com/2010-04-01/Accounts/AC123/Recordings/RE456.json",
      "started_at": "2024-01-15T10:30:00Z",
      "status": "in_progress",
      "stream_sid": "MZ1234567890abcdef1234567890abcdef",
      "summary": "Customer called to check order status for order #12345. Agent confirmed the order shipped yesterday.",
      "system_prompt_key": "default",
      "tenant_id": "tenant-123",
      "to_number": "+15555551234",
      "transcript": [
        {
          "content": null,
          "role": null,
          "timestamp": null
        }
      ],
      "updated_at": "2024-01-15T10:32:22Z",
      "voice": "alloy"
    },
    "ok": true
  }
  ```
</ResponseExample>
