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

# Get conversations for contacts

> Find real email, SMS, and call conversations by the contacts’ stored email addresses and phone numbers, without a helpdesk ticket requirement. Includes open and closed threads by default, with no recent-date cutoff. Excludes junk/deleted streams and synthetic bulk-campaign activity. Newest message first, across accessible inboxes. API keys have company scope; delegate tokens need contacts:* read scope and follow current membership, inbox/team/monitor and contact-type sharing permissions (respecting channel opt-outs). Every contact must be active and in the authenticated company. Empty addresses return an empty page.



## OpenAPI

````yaml /openapi.yaml post /api/contacts/conversations
openapi: 3.0.3
info:
  title: Aptly API
  version: '1.0'
  description: |
    The Aptly API lets external systems work with boards, contacts, inboxes,
    tasks, files, and other Aptly resources.

    Most endpoints accept an API key in the `x-token` header. Some endpoints
    also accept a delegate token or partner bearer token, as shown in each
    operation's security requirements, and explicitly public endpoints require
    no credential. API keys are scoped to a company and may be restricted to
    specific boards and read, insert, or update permissions; requests outside
    those restrictions receive a 403 `FORBIDDEN` response.
servers:
  - url: https://core-api.getaptly.com
    description: Production
security:
  - ApiKeyHeader: []
paths:
  /api/contacts/conversations:
    post:
      tags:
        - Contacts
      summary: Get conversations for contacts
      description: >-
        Find real email, SMS, and call conversations by the contacts’ stored
        email addresses and phone numbers, without a helpdesk ticket
        requirement. Includes open and closed threads by default, with no
        recent-date cutoff. Excludes junk/deleted streams and synthetic
        bulk-campaign activity. Newest message first, across accessible inboxes.
        API keys have company scope; delegate tokens need contacts:* read scope
        and follow current membership, inbox/team/monitor and contact-type
        sharing permissions (respecting channel opt-outs). Every contact must be
        active and in the authenticated company. Empty addresses return an empty
        page.
      operationId: getConversationsForContacts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - personIds
              properties:
                personIds:
                  type: array
                  minItems: 1
                  maxItems: 20
                  items:
                    type: string
                    minLength: 1
                    maxLength: 128
                status:
                  type: string
                  enum:
                    - all
                    - open
                    - closed
                  default: all
                inboxId:
                  type: string
                  description: >-
                    Channel meta.id; narrows authorized inboxes, never expands
                    access.
                search:
                  type: string
                  maxLength: 200
                  description: Subject contains text; comma-separated literal alternatives.
                skip:
                  type: integer
                  minimum: 0
                  maximum: 100000
                  default: 0
                limit:
                  type: integer
                  minimum: 1
                  maximum: 60
                  default: 20
            example:
              personIds:
                - contact-1
                - contact-2
              status: all
              skip: 0
              limit: 20
      responses:
        '200':
          description: A page of matching conversations.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactConversationsResponse'
        '400':
          description: Invalid contact IDs, filters or pagination.
        '401':
          description: Invalid or missing credentials.
        '403':
          description: >-
            Missing scope, inactive user membership, guest user, or inaccessible
            inbox.
        '404':
          description: >-
            One or more contacts are missing, archived, deleted or outside the
            company.
      security:
        - ApiKeyHeader: []
        - DelegateToken: []
components:
  schemas:
    ContactConversationsResponse:
      type: object
      required:
        - personIds
        - conversations
        - hasMore
        - skip
        - limit
      properties:
        personIds:
          type: array
          items:
            type: string
        conversations:
          type: array
          items:
            type: object
            required:
              - _id
              - subject
              - description
              - messageCount
            properties:
              _id:
                type: string
                description: Conversation stream ID.
              subject:
                type: string
                nullable: true
              description:
                type: string
                maxLength: 500
              type:
                type: string
              status:
                type: integer
                description: 0 closed, 1 open, 2 waiting, 3 replied.
              assigneeId:
                type: string
                nullable: true
              participants:
                type: array
                items:
                  type: string
              channel:
                type: object
                properties:
                  id:
                    type: string
                  type:
                    type: string
              messageCount:
                type: integer
              metrics:
                type: object
                properties:
                  lastMessageAt:
                    type: string
                    format: date-time
                  lastActivityAt:
                    type: string
                    format: date-time
                    nullable: true
                  lastMessageDirection:
                    type: string
                    enum:
                      - in
                      - out
                    nullable: true
        hasMore:
          type: boolean
          description: When true, request the next page with skip + limit.
        skip:
          type: integer
        limit:
          type: integer
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: x-token
    DelegateToken:
      type: apiKey
      in: header
      name: Authorization
      description: 'Delegate token issued by the platform. Format: `DelegateToken <token>`'

````

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