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

# List contact calls

> Dial attempts for a contact — status, hasAnalysis, optional summary.

Newest-first dials for a contact you own (`contactId` from `POST /leads`).

| Field         | Meaning                                                                      |
| ------------- | ---------------------------------------------------------------------------- |
| `callId`      | Id for [Get contact call](/api-reference/endpoint/contacts/get-contact-call) |
| `hasAnalysis` | Post-call analysis joined                                                    |
| `summary`     | Short preview when analysis exists                                           |

Poll until `hasAnalysis: true`, then fetch the call detail.


## OpenAPI

````yaml openapi.json GET /api/v1/contacts/{id}/calls
openapi: 3.0.3
info:
  title: Ondial Public API
  version: 1.0.0
  description: >-
    Tenant API-key surface for lead ingest, contacts (including dial
    conversation + analysis), events, inbound agents, company profiles, and
    knowledge-base documents.


    **Campaign definition is UI-only** — create and start an API-ingest campaign
    in the dashboard, then push leads here.


    **Auth:** `Authorization: Bearer ond_live_…` or `ond_test_…` (or
    `X-API-Key`). Keys are requested in **API Access** with a friendly **key
    name**, then approved by Super Admin (not self-serve). Tenants can rename
    keys later without rotating the secret.


    **Scopes:** Company and knowledge-base routes require opt-in scopes
    (`companies:read`, `companies:write`, `knowledge:read`, `knowledge:write`)
    granted at key approval. Missing scope → `403 forbidden`.


    **Sandbox** keys never place PSTN dials or live WhatsApp/email and do not
    burn credits (KB upload skips debit).


    **Security:** Company responses never include SMTP/WhatsApp credentials. KB
    v1 is metadata-only — no file download.


    **Kill switch:** Super Admin can disable all `/api/v1/*` (`503` /
    `api_globally_disabled`) without stopping UI CSV campaigns.


    **Compliance:** Call channel requires `consent.outboundCall: true` and phone
    not on tenant/platform DNC.
servers:
  - url: https://dashboard.ondial.ai
    description: Production
  - url: http://localhost:3001
    description: Local
security:
  - BearerAuth: []
tags:
  - name: Core
    description: Auth check and lead ingest
  - name: Contacts
    description: Status, dials/conversation/analysis, cancel, delete, follow-ups, list
  - name: Events
    description: ERP event bus slice — eventType → campaign
  - name: Outbound
    description: >-
      Read-only campaign lookup for API / Custom CRM. Create and start campaigns
      in the dashboard.
  - name: Inbound agents
    description: Configure inbound agents; list/buy pool numbers; read credits
  - name: Companies
    description: >-
      Company profile CRUD (requires companies:read / companies:write scopes).
      Never returns SMTP or WhatsApp credentials.
  - name: Knowledge bases
    description: >-
      Knowledge document upload/list/delete (requires knowledge:read /
      knowledge:write scopes). Metadata only — no file download via API.
paths:
  /api/v1/contacts/{id}/calls:
    get:
      tags:
        - Contacts
      summary: List dial attempts for a contact
      description: >-
        Newest-first list of CallLogs for a contact you own. Each row includes
        `hasAnalysis` and an optional short `summary` when analysis is ready.
        Analysis can lag call completion — poll until `hasAnalysis: true`.
      operationId: listContactCalls
      parameters:
        - $ref: '#/components/parameters/ContactId'
        - name: limit
          in: query
          schema:
            type: integer
            default: 20
            minimum: 1
            maximum: 50
          description: Max attempts to return (capped at 50)
      responses:
        '200':
          description: Dial list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactCallsList'
              example:
                contactId: 6a7b0a00b7cea10e16bc4e25
                calls:
                  - callId: a1b2c3d4-e5f6-4789-a012-3456789abcde
                    status: completed
                    startedAt: '2026-08-12T04:29:00.000Z'
                    endedAt: '2026-08-12T04:30:00.000Z'
                    durationSec: 60
                    hasAnalysis: true
                    summary: Prospect interested in a callback
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    ContactId:
      name: id
      in: path
      required: true
      schema:
        type: string
  schemas:
    ContactCallsList:
      type: object
      properties:
        contactId:
          type: string
        calls:
          type: array
          items:
            $ref: '#/components/schemas/ContactCallSummary'
    ContactCallSummary:
      type: object
      properties:
        callId:
          type: string
        status:
          type: string
          nullable: true
        startedAt:
          type: string
          nullable: true
        endedAt:
          type: string
          nullable: true
        durationSec:
          type: integer
        hasAnalysis:
          type: boolean
        summary:
          type: string
          nullable: true
    ErrorBody:
      type: object
      properties:
        error:
          type: string
        reasonCode:
          type: string
        missing:
          type: array
          items:
            type: string
  responses:
    Unauthorized:
      description: Missing, invalid, or inactive API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
          example:
            error: Invalid or inactive API key
            reasonCode: unauthorized
    NotFound:
      description: Not found or not owned
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
          example:
            error: Not found
            reasonCode: not_found
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: ond_live | ond_test
      description: >-
        Paste only your API key (`ond_live_…` or `ond_test_…`). Do not type the
        word Bearer — the playground adds it.

````