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

# List SMS conversations

> Lists SMS conversations for the authenticated organization. Results are cursor-paginated and include the current conversation status for reconciliation.



## OpenAPI

````yaml /openapi/v1.json get /sms-conversations
openapi: 3.0.3
info:
  title: PAM Outbound API
  version: 1.0.0
  description: >-
    External API for creating outbound calls, starting SMS conversations,
    managing API keys, and receiving webhook events.
servers:
  - url: https://api.pamhq.com/v1
    description: Production
security:
  - bearerApiKey: []
tags:
  - name: Calls
    description: Start and manage outbound voice calls.
  - name: SMS Conversations
    description: Start and manage outbound SMS conversations.
  - name: API Keys
    description: Create, list, inspect, and revoke API keys.
  - name: Webhooks
    description: Configure direct call and SMS conversation webhook destinations.
  - name: Webhook Events
    description: Canonical webhook payloads emitted by calls and SMS conversations.
paths:
  /sms-conversations:
    get:
      tags:
        - SMS Conversations
      summary: List SMS conversations
      description: >-
        Lists SMS conversations for the authenticated organization. Results are
        cursor-paginated and include the current conversation status for
        reconciliation.
      operationId: listSmsConversations
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/conversationStatus'
        - $ref: '#/components/parameters/agentIdQuery'
        - $ref: '#/components/parameters/toNumberQuery'
        - $ref: '#/components/parameters/fromNumberQuery'
        - $ref: '#/components/parameters/createdAfter'
        - $ref: '#/components/parameters/createdBefore'
      responses:
        '200':
          description: SMS conversations returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmsConversationListResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  parameters:
    limit:
      name: limit
      in: query
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 20
      description: Maximum number of records to return.
    cursor:
      name: cursor
      in: query
      schema:
        type: string
      description: Pagination cursor from the previous response.
    conversationStatus:
      name: status
      in: query
      schema:
        $ref: '#/components/schemas/ConversationStatus'
      description: Filter conversations by status.
    agentIdQuery:
      name: agentId
      in: query
      schema:
        type: string
        format: uuid
      description: Filter conversations by agent id.
    toNumberQuery:
      name: toNumber
      in: query
      schema:
        $ref: '#/components/schemas/E164PhoneNumber'
      description: Filter conversations by customer phone number.
    fromNumberQuery:
      name: fromNumber
      in: query
      schema:
        $ref: '#/components/schemas/E164PhoneNumber'
      description: Filter conversations by PAM phone number.
    createdAfter:
      name: createdAfter
      in: query
      schema:
        type: string
        format: date-time
      description: Filter conversations created at or after this timestamp.
    createdBefore:
      name: createdBefore
      in: query
      schema:
        type: string
        format: date-time
      description: Filter conversations created before this timestamp.
  schemas:
    SmsConversationListResponse:
      allOf:
        - $ref: '#/components/schemas/PaginatedResponse'
        - type: object
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/SmsConversation'
    ConversationStatus:
      type: string
      enum:
        - queued
        - in_progress
        - completed
        - failed
        - cancelled
    E164PhoneNumber:
      type: string
      pattern: ^\+\d{7,15}$
      description: Phone number in E.164 format.
    PaginatedResponse:
      type: object
      properties:
        data:
          type: array
          items: {}
        meta:
          allOf:
            - $ref: '#/components/schemas/Meta'
            - type: object
              properties:
                pagination:
                  $ref: '#/components/schemas/Pagination'
    SmsConversation:
      type: object
      required:
        - id
        - conversationId
        - status
        - agentId
        - agentVersionId
        - fromNumber
        - toNumber
        - dynamicVariables
        - startedAt
        - endedAt
        - endReason
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          format: uuid
        conversationId:
          type: string
          format: uuid
        status:
          $ref: '#/components/schemas/ConversationStatus'
        agentId:
          type: string
          format: uuid
        agentVersionId:
          type: string
          format: uuid
        fromNumber:
          $ref: '#/components/schemas/E164PhoneNumber'
        toNumber:
          $ref: '#/components/schemas/E164PhoneNumber'
        dynamicVariables:
          $ref: '#/components/schemas/DynamicVariables'
        metadata:
          type: object
          additionalProperties: true
        startedAt:
          type: string
          format: date-time
          nullable: true
          description: When the SMS conversation moved into progress. Null while queued.
        endedAt:
          type: string
          format: date-time
          nullable: true
        endReason:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        agent:
          $ref: '#/components/schemas/ConversationAgent'
        agentVersion:
          $ref: '#/components/schemas/ConversationAgentVersion'
        messages:
          type: array
          items:
            $ref: '#/components/schemas/ConversationMessage'
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            details:
              description: Optional field-level validation details.
              nullable: true
        meta:
          $ref: '#/components/schemas/Meta'
    Meta:
      type: object
      properties:
        requestId:
          type: string
    Pagination:
      type: object
      properties:
        cursor:
          type: string
          nullable: true
        hasMore:
          type: boolean
    DynamicVariables:
      type: object
      additionalProperties:
        type: string
      description: >-
        Public string values used by the selected agent. PAM-managed recall,
        retention, and declined-services agents require the variables listed in
        the Agents guide. PAM may generate internal prompt context blocks from
        these values; generated context blocks are not returned by conversation
        GET or list responses.
    ConversationAgent:
      type: object
      properties:
        id:
          type: string
          format: uuid
        slug:
          type: string
        name:
          type: string
        channel:
          $ref: '#/components/schemas/ConversationChannel'
    ConversationAgentVersion:
      type: object
      properties:
        id:
          type: string
          format: uuid
        version:
          type: integer
    ConversationMessage:
      type: object
      properties:
        id:
          type: string
          format: uuid
        role:
          type: string
        direction:
          type: string
          nullable: true
        sequenceNumber:
          type: integer
        content:
          type: string
          nullable: true
        toolCallId:
          type: string
          nullable: true
        toolName:
          type: string
          nullable: true
        toolVersionId:
          type: string
          format: uuid
          nullable: true
        toolArguments:
          type: object
          additionalProperties: true
          nullable: true
        toolResult:
          nullable: true
        error:
          nullable: true
        createdAt:
          type: string
          format: date-time
        delivery:
          $ref: '#/components/schemas/ConversationMessageDelivery'
    ConversationChannel:
      type: string
      enum:
        - voice
        - sms
    ConversationMessageDelivery:
      type: object
      nullable: true
      properties:
        provider:
          type: string
        deliveryStatus:
          type: string
          nullable: true
        sentAt:
          type: string
          format: date-time
          nullable: true
        deliveredAt:
          type: string
          format: date-time
          nullable: true
        failedAt:
          type: string
          format: date-time
          nullable: true
        segments:
          type: integer
          nullable: true
        encoding:
          type: string
          nullable: true
  responses:
    Unauthorized:
      description: Missing, expired, revoked, or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ServerError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerApiKey:
      type: http
      scheme: bearer
      description: 'API key provided as `Authorization: Bearer <key>`.'
      x-default: pk_live_your_api_key

````