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

# Get contact DM history



## OpenAPI

````yaml /openapi.json get /api/v1/contacts/{id}/messages
openapi: 3.1.0
info:
  title: Instance Public API
  version: 1.0.0
  description: >-
    Programmatic REST API for Instance CRM, Sales Chat, Automations, Audience
    Lists, Bio Links, Scheduled Posts, Analytics, and Webhooks.
servers:
  - url: http://localhost:4000
    description: Local Self-Hosted Development
  - url: https://api.yourdomain.com
    description: Production Instance API
security:
  - ApiKeyAuth: []
tags:
  - name: Workspace
    description: Workspace info, tags, pipelines, and automations list
  - name: Contacts
    description: CRM leads, tags, stages, assignments, and history
  - name: Conversations
    description: Sales Chat threads, AI toggle, Whisper Notes, and deal closing
  - name: Messages
    description: Send outbound Instagram DMs
  - name: Automations
    description: Trigger, update, and inspect automation executions
  - name: Audience Lists
    description: Segmented email/phone contact lists
  - name: Bio Links
    description: Bio Link page settings, links, products, leads, and analytics
  - name: Posts
    description: Schedule and manage Instagram Photos, Reels, Carousels, and Stories
  - name: Instagram
    description: Media, Story mentions, and DM Icebreakers
  - name: Analytics
    description: Workspace overview and sales funnel metrics
  - name: Webhooks
    description: Manage outbound HMAC-SHA256 webhooks
paths:
  /api/v1/contacts/{id}/messages:
    get:
      tags:
        - Contacts
      summary: Get contact DM history
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: limit
          in: query
          required: false
          description: Maximum number of messages to return (default 50, max 100)
          schema:
            type: integer
            default: 50
            maximum: 100
      responses:
        '200':
          description: Contact DM history
          content:
            application/json:
              schema:
                type: object
              example:
                status: success
                data:
                  contact_id: cm3abc123contact
                  conversation_id: conv_123
                  is_ai_active: true
                  funnel_stage: Qualified
                  messages:
                    - id: msg_1
                      direction: INBOUND
                      message_type: TEXT
                      content: How much is the coaching program?
                      sent_at: '2026-04-10T14:20:00.000Z'
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Workspace API key generated in Dashboard -> Settings -> API Keys
        (inst_live_...)

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.