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

# List Text Messages

> Returns the message thread for one of your recipients: your outbound sends and the consumer's inbound replies, newest first. Use this to poll for replies if you do not want to run a webhook endpoint, or to backfill replies after a webhook outage. Results are always scoped to your organization. Provide at least one of `messageId`, `debtorId`, `destination`, or `since`.



## OpenAPI

````yaml GET /text/messages
openapi: 3.0.1
info:
  title: CollectWise API
  description: >-
    An API for managing debtors, tracking statuses, and automating debt
    collection processes
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://collectwiseapi.com
security:
  - apiKey: []
paths:
  /text/messages:
    get:
      summary: List text messages
      description: >-
        Returns the message thread for one of your recipients: your outbound
        sends and the consumer's inbound replies, newest first. Use this to poll
        for replies if you do not want to run a webhook endpoint, or to backfill
        replies after a webhook outage. Results are always scoped to your
        organization. Provide at least one of `messageId`, `debtorId`,
        `destination`, or `since`.
      parameters:
        - name: messageId
          in: query
          required: false
          schema:
            type: string
          description: >-
            A `messageId` returned by the send endpoint. Returns that message's
            whole thread, in both directions. 404 if the id does not belong to
            your organization.
        - name: debtorId
          in: query
          required: false
          schema:
            type: string
          description: Your reference for the recipient, as sent on `debtorId`.
        - name: destination
          in: query
          required: false
          schema:
            type: string
          description: >-
            Recipient phone number, in any of the formats the send endpoint
            accepts.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 200
            default: 50
          description: Maximum number of messages to return.
        - name: since
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: >-
            ISO 8601 timestamp. Returns only messages created at or after it.
            Valid on its own, so you can use it to backfill everything your
            organization received after a webhook outage.
      responses:
        '200':
          description: Matching messages, newest first.
          content:
            application/json:
              schema:
                type: object
                required:
                  - count
                  - messages
                properties:
                  count:
                    type: integer
                  messages:
                    type: array
                    items:
                      $ref: '#/components/schemas/TextMessage'
              example:
                count: 2
                messages:
                  - messageId: 4d1a0b7c-9e2f-4c31-8a77-2b6f0d1e5c44
                    direction: inbound
                    status: Delivered
                    message: when is my payment due
                    debtorId: your-reference-number
                    destination: '+13313048434'
                    conversationId: conv_087b83bb525d4fceaaa01a4234b6b012
                    templateId: null
                    messageType: sms
                    mediaUrls: null
                    createdAt: '2026-08-17T12:00:00.000Z'
                    updatedAt: null
                  - messageId: 1b1f0a9e-6f4e-4f4b-9a2e-1f2d3c4b5a69
                    direction: outbound
                    status: Delivered
                    message: >-
                      Jane, this is Acme Recovery Group, a debt collector. Your
                      balance is $430.10. Reply STOP to opt out.
                    debtorId: your-reference-number
                    destination: '+13313048434'
                    conversationId: conv_087b83bb525d4fceaaa01a4234b6b012
                    templateId: 100
                    messageType: sms
                    mediaUrls: null
                    createdAt: '2026-08-17T11:58:02.000Z'
                    updatedAt: '2026-08-17T11:58:07.000Z'
        '400':
          description: >-
            No filter supplied, an invalid `destination`, a `limit` outside
            1–200, or a `since` that is not an ISO 8601 timestamp.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TextError'
              example:
                error: Provide messageId, debtorId, destination or since
        '403':
          description: Texting not enabled for your organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TextError'
              example:
                error: Texting is not enabled for this organization
        '404':
          description: >-
            The supplied `messageId` is unknown or does not belong to your
            organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TextError'
              example:
                error: Message not found
        '429':
          description: Rate limit exceeded (60 reads/min per organization).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TextError'
              example:
                error: Too many requests
        '500':
          description: Unexpected server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TextError'
              example:
                error: Internal server error
components:
  schemas:
    TextMessage:
      type: object
      required:
        - messageId
        - direction
      properties:
        messageId:
          type: string
          description: >-
            For an outbound message, the id returned by the send endpoint. For
            an inbound reply, the id of that reply.
        direction:
          type: string
          enum:
            - outbound
            - inbound
          description: >-
            `outbound` for messages you sent, `inbound` for the consumer's
            replies.
        status:
          type: string
          description: Carrier status. Inbound replies are recorded as Delivered.
        message:
          type: string
          description: The message body as sent or received.
        debtorId:
          type: string
          description: Your reference for the recipient.
        destination:
          type: string
          description: The consumer's phone number, in E.164 format.
        conversationId:
          type: string
          nullable: true
          description: >-
            Thread id. Messages to and from a number group into one
            conversation, which rolls over after 7 days idle.
        templateId:
          type: integer
          nullable: true
          description: >-
            The template this message was rendered from. Null for free-form
            sends and for inbound replies.
        messageType:
          type: string
          enum:
            - sms
            - mms
        mediaUrls:
          type: array
          nullable: true
          items:
            type: string
          description: Attachment URLs. Non-null only for MMS.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
          nullable: true
    TextError:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message.
      example:
        error: Texting is not enabled for this organization
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: collectwise_key

````