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

# Get a chat by id

> Answers 404 when the id does not exist or belongs to another project.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/chats/{id}
openapi: 3.0.3
info:
  title: Leadstaker API
  version: 1.0.0
  description: Public REST API for Leadstaker projects.
servers:
  - url: https://n-api.leadstaker.com
    description: Production
security: []
tags:
  - name: Fields
    description: >-
      Custom field definitions, both the built-in ones and the ones a project
      creates.
  - name: Field groups
    description: Sections that organize custom fields in the interface.
  - name: Deals
    description: Opportunities moving through a pipeline, each tied to a contact.
  - name: Contacts
    description: >-
      People inside a project, holding the custom field values collected about
      them.
  - name: Messages
    description: Individual messages inside a chat, inbound and outbound.
  - name: Chats
    description: Conversations with a contact over a connected channel.
  - name: Loss reasons
    description: The catalog of reasons a deal can be marked as lost.
  - name: Pipelines
    description: Ordered sets of stages a deal travels through.
  - name: Stages
    description: Steps inside a pipeline, including the built-in open and closed ones.
  - name: Tags
    description: Free-form labels attached to deals.
  - name: Notes
    description: >-
      Free text attached to a contact or a deal, written by a user, an agent, or
      the system.
paths:
  /v1/chats/{id}:
    get:
      tags:
        - Chats
      summary: Get a chat by id
      description: Answers 404 when the id does not exist or belongs to another project.
      operationId: getChatsById
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            minLength: 1
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  archivedAt:
                    type: string
                    format: date-time
                  projectId:
                    type: string
                    minLength: 1
                  channelId:
                    type: string
                    minLength: 1
                  externalId:
                    type: string
                    minLength: 1
                  contactId:
                    type: string
                    minLength: 1
                  identifiers:
                    type: object
                    properties:
                      phone:
                        type: string
                        minLength: 1
                      email:
                        type: string
                        minLength: 1
                      whatsapp_lid:
                        type: string
                        minLength: 1
                      test_id:
                        type: string
                        minLength: 1
                      custom:
                        type: string
                        minLength: 1
                    additionalProperties: false
                  profile:
                    type: object
                    properties:
                      name:
                        type: string
                        minLength: 1
                      avatar:
                        type: string
                        minLength: 1
                    additionalProperties: false
                  status:
                    type: string
                    enum:
                      - INBOX
                      - OPEN
                      - CLOSED
                  agent:
                    type: object
                    properties:
                      id:
                        type: string
                        minLength: 1
                      status:
                        type: string
                        enum:
                          - ACTIVE
                          - DISABLED
                    required:
                      - id
                      - status
                    additionalProperties: false
                  unreadMessagesCount:
                    type: number
                  isTest:
                    type: boolean
                  pipelineId:
                    type: string
                    minLength: 1
                    nullable: true
                  createdAt:
                    type: string
                    minLength: 1
                  updatedAt:
                    type: string
                    minLength: 1
                required:
                  - id
                  - projectId
                  - channelId
                  - externalId
                  - identifiers
                  - status
                  - unreadMessagesCount
                  - pipelineId
                additionalProperties: false
              example:
                id: 6713cc481f52bb0014a7d3e9
                projectId: 665f1c2e8a94b70012d4e9a1
                channelId: 66f0b2c39d85cc0013d4e5f6
                externalId: 5551999999999@s.whatsapp.net
                contactId: 6712a4d95b38ee0011c9f2b4
                pipelineId: null
                identifiers:
                  phone: '+5551999999999'
                profile:
                  name: Maria Andrade
                status: OPEN
                agent:
                  id: 66f5a1d28e94bb0012c3d4e5
                  status: ACTIVE
                unreadMessagesCount: 2
                createdAt: '2026-01-12T14:08:00.000Z'
                updatedAt: '2026-01-15T09:32:00.000Z'
        '401':
          description: Missing or invalid credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - apiKey: []
components:
  schemas:
    Error:
      type: object
      required:
        - errorCode
        - message
        - status
      properties:
        errorCode:
          type: string
        message:
          type: string
        status:
          type: integer
        errors:
          type: array
          items:
            type: object
            required:
              - field
              - code
              - message
            properties:
              field:
                type: string
              code:
                type: string
              message:
                type: string
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````