# Get call events (/docs/api-reference/calls/getCallEvents)

> What happened on one call, step by step: what the caller and the agent said, how long the agent took to reply, the tools it ran, transfers, voicemail, language switches, interruptions, errors, and how the call ended.

**GET** `/calls/logs/{call_log_id}/events`

What happened on one call, step by step: what the caller and the agent
said, how long the agent took to reply, the tools it ran, transfers,
voicemail, language switches, interruptions, errors, and how the call
ended.

Use it to find out why a call went the way it did: why it hung up, why
a transfer failed, or where the agent was slow.

Calls older than 30 days have no timeline. For those,
`timeline_available` is `false` and `turns` holds the transcript only.

```yaml
operationId: getCallEvents
parameters:
  - in: query
    name: user_id
    required: false
    description: |
      Reseller keys only: act as one of your clients by its user id. Omit
      it to act on your own account.
      [How acting for a client works](/docs/reseller/your-clients/acting-as-clients).
    schema:
      type: integer
      description: |
        Reseller keys only: act as one of your clients by its user id. Omit
        it to act on your own account.
        [How acting for a client works](/docs/reseller/your-clients/acting-as-clients).
      example: 1234
  - name: call_log_id
    in: path
    required: true
    schema:
      type: integer
    description: Id of the call log, as returned by the call log list.
responses:
  '200':
    description: The call's steps and how it ended.
    content:
      application/json:
        schema:
          type: object
          description: |
            What happened on one call, step by step, with the facts about how it
            was answered and how it ended.
          properties:
            call_id:
              type: integer
              description: Id of the call log.
            answered_by:
              type: string
              enum:
                - human
                - voicemail
                - unknown
              description: Who picked up, as far as the call could tell.
            amd_detected:
              type: boolean
              description: Whether answering machine detection ran on the call.
            end_reason:
              type: string
              description: Why the call ended.
              enum:
                - caller_hung_up
                - agent_ended
                - silence_timeout
                - voicemail
                - transferred
                - platform_ended
                - carrier_ended
                - screening
                - no_answer
                - busy
                - failed
                - canceled
                - unknown
            duration_s:
              type: number
              description: Call length in seconds.
            voicemail_detection_on:
              type: boolean
              description: Whether voicemail detection was on for this call.
            transfer_attempted:
              type: boolean
              description: Whether the agent tried to transfer the call.
            transfer_connected:
              type: boolean
              description: Whether a transfer went through.
            timeline_available:
              type: boolean
              description: |
                `false` for calls older than 30 days. Their `turns` then come from
                the transcript only, with no times, latencies or events.
            turns:
              type: array
              maxItems: 500
              description: The call's steps, oldest first. At most 500.
              items:
                type: object
                description: One step of a call.
                properties:
                  t_ms:
                    type:
                      - integer
                      - 'null'
                    description: Milliseconds from the start of the call. `null` when the call has no timeline.
                  speaker:
                    type: string
                    enum:
                      - caller
                      - agent
                      - system
                  text:
                    type:
                      - string
                      - 'null'
                    description: |
                      What was said, for `speech`. For `tool_call`, the name of your custom
                      API tool; `null` for built-in tools.
                  kind:
                    type: string
                    enum:
                      - speech
                      - tool_call
                      - transfer
                      - voicemail_detected
                      - language_switch
                      - interrupt
                      - silence_nudge
                      - hangup
                      - error
                    description: |
                      - `speech`: the caller or the agent spoke.
                      - `tool_call`: the agent ran a tool.
                      - `transfer`: the agent started a transfer.
                      - `voicemail_detected`: the call reached voicemail.
                      - `language_switch`: the conversation changed language.
                      - `interrupt`: the caller spoke over the agent.
                      - `silence_nudge`: the agent prompted a silent caller.
                      - `hangup`: the call ended.
                      - `error`: something failed during the call.
                  reason:
                    type:
                      - string
                      - 'null'
                    description: |
                      Set on `hangup` (the same values as `end_reason`), `error`
                      (`speech_recognition_error`, `voice_generation_error`,
                      `ai_response_error`, `tool_error`, `recording_error`,
                      `telephony_error`, `platform_error`), and on a failed `tool_call`
                      (`tool_failed`) or `transfer` (`transfer_failed`).
                  latency_ms:
                    type:
                      - integer
                      - 'null'
                    description: >-
                      On agent `speech`, the milliseconds between the caller finishing and the agent
                      starting to speak.
                  language:
                    type:
                      - string
                      - 'null'
                    description: On `language_switch`, the language the conversation moved to.
            truncated:
              type: boolean
              description: '`true` when the call had more than 500 steps and only the first 500 are listed.'
  '401':
    description: Missing or invalid API key.
    content:
      application/json:
        schema:
          type: object
          properties:
            error:
              type: string
              description: Machine-readable error code.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: |
                Stable, specific reason. Present on the newer endpoints (Voice
                cloning, WhatsApp); older endpoints return only `error`.
            request_id:
              type: string
              description: |
                Correlates this response with the server log. Present alongside
                `code`. Also sent as the `X-Request-Id` header.
        example:
          error: unauthorized
          error_description: Missing or invalid API key
  '404':
    description: Not found, or not yours. The two look the same, so an id says nothing about other accounts.
    content:
      application/json:
        schema:
          type: object
          properties:
            error:
              type: string
              description: Machine-readable error code.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: |
                Stable, specific reason. Present on the newer endpoints (Voice
                cloning, WhatsApp); older endpoints return only `error`.
            request_id:
              type: string
              description: |
                Correlates this response with the server log. Present alongside
                `code`. Also sent as the `X-Request-Id` header.
        example:
          error: not_found
          error_description: Support case not found.
```

**curl**

```bash
curl -X GET "https://omnidim.io/api/v1/calls/logs/{call_log_id}/events?user_id=1234" \
  -H "Authorization: Bearer $OMNIDIM_API_KEY"
```