> ## 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.

# Get an SMS conversation

> Returns the current status for one SMS conversation. Use this endpoint to reconcile state after missed, delayed, or retried webhooks.



## OpenAPI

````yaml /openapi/v1.json get /sms-conversations/{id}
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/{id}:
    get:
      tags:
        - SMS Conversations
      summary: Get an SMS conversation
      description: >-
        Returns the current status for one SMS conversation. Use this endpoint
        to reconcile state after missed, delayed, or retried webhooks.
      operationId: getSmsConversation
      parameters:
        - $ref: '#/components/parameters/conversationId'
      responses:
        '200':
          description: SMS conversation returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmsConversationResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  parameters:
    conversationId:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: Conversation ID.
  schemas:
    SmsConversationResponse:
      allOf:
        - $ref: '#/components/schemas/ResponseEnvelope'
        - type: object
          properties:
            data:
              $ref: '#/components/schemas/SmsConversation'
    ResponseEnvelope:
      type: object
      properties:
        data: {}
        meta:
          $ref: '#/components/schemas/Meta'
    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
    ConversationStatus:
      type: string
      enum:
        - queued
        - in_progress
        - completed
        - failed
        - cancelled
    E164PhoneNumber:
      type: string
      pattern: ^\+\d{7,15}$
      description: Phone number in E.164 format.
    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'
    NotFound:
      description: Resource not found.
      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

````