> ## 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.

# Get contact

> Poll contact status after lead ingest — includes lastCall pointer.

Returns status fields (`status`, `callReceiveStatus`, WhatsApp/email queue fields, `source`, `sandbox`) plus:

| Field                                      | Meaning                                                                        |
| ------------------------------------------ | ------------------------------------------------------------------------------ |
| `lastCall`                                 | Latest dial pointer (`callId`, `status`, `hasAnalysis`, `startedAt`) or `null` |
| `emailTemplateId` / `emailProfileId`       | Pending Omni email send (from lead ingest)                                     |
| `whatsappTemplateId` / `whatsappProfileId` | Pending Omni WhatsApp send                                                     |
| `emailScheduledAt` / `whatsappScheduledAt` | First-touch send clocks                                                        |
| `templateVariables` / `whatsappParams`     | Merge vars queued for send                                                     |

## Try It

1. Paste your API key (Bearer)
2. Set path `id` to your `contactId`

After a dial finishes, use `lastCall.callId` with [List contact calls](/api-reference/endpoint/contacts/list-contact-calls) / [Get contact call](/api-reference/endpoint/contacts/get-contact-call) for transcript and analysis. Poll until `lastCall.hasAnalysis` is `true` if you need AI results.


## OpenAPI

````yaml openapi.json GET /api/v1/contacts/{id}
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}:
    get:
      tags:
        - Contacts
      summary: Get contact status
      description: >-
        Queue/status fields plus a light `lastCall` pointer (`callId`, `status`,
        `hasAnalysis`, `startedAt`) when a dial exists. Use list/detail call
        endpoints for transcript and analysis.
      operationId: getContact
      parameters:
        - $ref: '#/components/parameters/ContactId'
      responses:
        '200':
          description: Contact
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactStatus'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    ContactId:
      name: id
      in: path
      required: true
      schema:
        type: string
  schemas:
    ContactStatus:
      type: object
      properties:
        contactId:
          type: string
        campaignId:
          type: string
        phone:
          type: string
        status:
          type: string
        callReceiveStatus:
          type: integer
        whatsappStatus:
          type: string
        whatsappQueueStatus:
          type: string
        emailStatus:
          type: string
        emailScheduledAt:
          type: string
          format: date-time
          nullable: true
        whatsappScheduledAt:
          type: string
          format: date-time
          nullable: true
        emailTemplateId:
          type: string
          nullable: true
        emailProfileId:
          type: string
          nullable: true
        whatsappTemplateId:
          type: string
          nullable: true
        whatsappProfileId:
          type: string
          nullable: true
        isFollowUp:
          type: boolean
        scheduledAt:
          type: string
          format: date-time
        requestedChannels:
          type: array
          items:
            type: string
        source:
          type: string
        sandbox:
          type: boolean
        deletedAt:
          type: string
          format: date-time
          nullable: true
        lastCall:
          $ref: '#/components/schemas/LastCallPointer'
    LastCallPointer:
      type: object
      nullable: true
      properties:
        callId:
          type: string
        status:
          type: string
        hasAnalysis:
          type: boolean
        startedAt:
          type: string
          format: date-time
          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.

````