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

# List conversations

> Returns the organization's conversations, most recent message first.



## OpenAPI

````yaml /openapi.json get /v1/conversations
openapi: 3.1.0
info:
  description: >-
    Trama's REST API. Authenticate with an organization API key, created under
    Settings → Developers, and send it as `Authorization: Bearer <key>` (or in
    the `x-api-key` header).


    Every key is bound to ONE organization: everything this API returns and
    everything it writes stays inside that organization, and no request ever
    names it.


    Errors always come back as `{ "error": { "code", "message" } }`. Branch on
    `code` — it is stable; the `message` text is not.
  title: Trama API
  version: 1.0.0
servers:
  - url: https://api.trama.so
security:
  - bearerAuth: []
  - apiKeyHeader: []
paths:
  /v1/conversations:
    get:
      tags:
        - Conversations
      summary: List conversations
      description: Returns the organization's conversations, most recent message first.
      parameters:
        - description: How many items to return. Maximum 100.
          in: query
          name: limit
          required: false
          schema:
            default: 25
            description: How many items to return. Maximum 100.
            example: 25
            maximum: 100
            minimum: 1
            type: integer
        - description: How many items to skip from the beginning.
          in: query
          name: offset
          required: false
          schema:
            default: 0
            description: How many items to skip from the beginning.
            example: 0
            minimum: 0
            type:
              - integer
              - 'null'
        - in: query
          name: activityState
          required: false
          schema:
            minLength: 1
            type: string
        - in: query
          name: channel
          required: false
          schema:
            example: whatsapp
            minLength: 1
            type: string
        - in: query
          name: customerId
          required: false
          schema:
            minLength: 1
            type: string
        - description: Matches against the contact name and the channel identifier.
          in: query
          name: query
          required: false
          schema:
            description: Matches against the contact name and the channel identifier.
            minLength: 1
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationList'
          description: The requested page.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: The request is not valid.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: The API key is missing or not valid.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: The resource does not exist in this organization.
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Conflict with the current state of the resource.
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: The API key exceeded its request limit. Retry later.
components:
  schemas:
    ConversationList:
      properties:
        data:
          items:
            $ref: '#/components/schemas/Conversation'
          type: array
        pagination:
          $ref: '#/components/schemas/Pagination'
      required:
        - data
        - pagination
      type: object
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
      required:
        - error
      type: object
    Conversation:
      properties:
        activityState:
          type:
            - string
            - 'null'
        channel:
          example: whatsapp
          type: string
        contact:
          description: The identifier on its channel — a phone number, a handle.
          type: string
        contactName:
          type:
            - string
            - 'null'
        controlledBy:
          description: >-
            Who holds the thread: the agent, or a person on the team who took
            over.
          type:
            - string
            - 'null'
        createdAt:
          format: date-time
          type: string
        customerId:
          type:
            - string
            - 'null'
        customerName:
          type:
            - string
            - 'null'
        id:
          type: string
        language:
          type:
            - string
            - 'null'
        lastMessageAt:
          format: date-time
          type:
            - string
            - 'null'
      required:
        - activityState
        - channel
        - contact
        - contactName
        - controlledBy
        - createdAt
        - customerId
        - customerName
        - id
        - language
        - lastMessageAt
      type: object
    Pagination:
      properties:
        limit:
          type: integer
        offset:
          type: integer
        total:
          type: integer
      required:
        - limit
        - offset
        - total
      type: object
    ApiError:
      properties:
        code:
          description: >-
            A stable, machine-readable code. Branch on this — the `message` text
            may change, the code will not.
          example: CATALOG_PRODUCT_NOT_FOUND
          type: string
        message:
          example: The catalog product does not exist.
          type: string
      required:
        - code
        - message
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: API key
      description: 'The organization API key, sent as `Authorization: Bearer <key>`.'
      scheme: bearer
      type: http
    apiKeyHeader:
      description: The same API key, sent in the `x-api-key` header.
      in: header
      name: x-api-key
      type: apiKey

````