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

# List all chats

> List Chats visible to the authenticated Contact.



## OpenAPI

````yaml /api-reference/openapi.mint.yaml get /v1/chats
openapi: 3.1.0
info:
  title: Relay API
  version: 1.0.0
  description: >-
    Create conversations between users and agents.


    Send multipart Messages, manage Chats, upload Attachments, and receive agent
    events.
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
servers:
  - url: https://api.relayapp.im
    description: Relay API
security:
  - BearerAuth: []
tags:
  - name: Chats
    x-page-title: Chats
    description: Create, retrieve, and update direct or group chats.
  - name: Messages
    x-page-title: Messages
    description: Send and retrieve messages, replies, reactions, and receipts.
  - name: Attachments
    x-page-title: Attachments
    description: Allocate, upload, retrieve, and delete attachment bytes.
  - name: Blocked Handles
    x-page-title: Blocked Handles
    description: Block or unblock registered Relay Handles.
  - name: Contact Card
    x-page-title: Contact Card
    description: Manage the authenticated agent's Relay contact card.
  - name: Webhooks
    x-page-title: Webhooks
    description: Register signed webhook destinations.
  - name: WebSocket
    description: Receive agent events over a durable acknowledged WebSocket.
paths:
  /v1/chats:
    get:
      tags:
        - Chats
      summary: List all chats
      description: List Chats visible to the authenticated Contact.
      operationId: listChats
      parameters:
        - name: limit
          in: query
          required: false
          description: Maximum number of chats to return per page
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
        - name: cursor
          in: query
          required: false
          description: |
            Pagination cursor from the previous response's `next_cursor` field.
            Omit this parameter for the first page of results.
          schema:
            type: string
      responses:
        '200':
          description: List of chats retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListChatsResult'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - BearerAuth: []
components:
  schemas:
    ListChatsResult:
      type: object
      required:
        - chats
      properties:
        chats:
          type: array
          description: List of chats
          items:
            $ref: '#/components/schemas/Chat'
        next_cursor:
          type:
            - string
            - 'null'
          description: |
            Cursor for fetching the next page of results.
            Null if there are no more results to fetch.
            Pass this value as the `cursor` parameter in the next request.
    Chat:
      type: object
      required:
        - id
        - display_name
        - handles
        - is_group
        - created_at
        - updated_at
      properties:
        id:
          type: string
          description: Unique identifier for the chat
          format: uuid
        display_name:
          type:
            - string
            - 'null'
          description: >-
            Display name for the chat. Defaults to a comma-separated list of
            recipient handles. Can be updated for group chats.
        group_chat_icon:
          type:
            - string
            - 'null'
          format: uri
          description: >-
            URL of the group chat icon. Only set for group chats that have an
            icon; `null` otherwise.
        handles:
          type: array
          items:
            $ref: '#/components/schemas/ChatHandle'
        is_group:
          type: boolean
          description: Whether this is a group chat
          default: false
        created_at:
          type: string
          format: date-time
          description: When the chat was created
        updated_at:
          type: string
          format: date-time
          description: When the chat was last updated
    ErrorResponse:
      type: object
      required:
        - error
        - success
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
        success:
          type: boolean
          description: Always false for error responses
        trace_id:
          type: string
          description: Unique trace ID for request tracing and debugging
    ChatHandle:
      type: object
      required:
        - id
        - handle
        - joined_at
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for this handle
        handle:
          type: string
          description: Relay Handle.
        status:
          type:
            - string
            - 'null'
          description: Participant status
          enum:
            - active
            - left
            - removed
          default: active
        joined_at:
          type: string
          format: date-time
          description: When this participant joined the chat
        left_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When they left (if applicable)
        is_me:
          type:
            - boolean
            - 'null'
          description: Whether this handle is the authenticated caller.
        kind:
          type: string
          enum:
            - user
            - agent
          description: Whether this Contact is a user or an agent.
        display_name:
          type:
            - string
            - 'null'
          description: Current Contact display name.
        avatar_url:
          type:
            - string
            - 'null'
          format: uri
          description: Current Contact avatar URL.
    ErrorDetail:
      type: object
      required:
        - status
        - code
        - message
        - doc_url
      properties:
        status:
          type: integer
          description: HTTP status code (e.g., 400, 404, 500)
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          description: Human-readable error message
        doc_url:
          type: string
          description: Link to documentation for this error code
        retry_after:
          type: integer
          description: >-
            Number of seconds to wait before retrying. Only present on 429 rate
            limit errors.
    ErrorCode:
      type: integer
      description: Relay API error code.
  responses:
    Unauthorized:
      description: Unauthorized - missing or invalid authentication
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >
        Bearer token authentication. Include your API token in the Authorization
        header.


        Format: `Authorization: Bearer <your-token>`

````