GET /requests/{requestId}/messages

Retrieve all messages for a request, sorted by createdAt descending. Each message includes a channel field (internal, email, or sms). Internal messages use the title/text format; email and SMS messages use the title/body/status/sendOn format.

Path parameters

  • requestId string Required

    The ID of the request

Query parameters

  • channel string

    Filter by channel (internal, email, or sms). If omitted, returns all messages across all channels.

    Values are internal, email, or sms.

Responses

  • 200 application/json

    List of messages for the request

    Hide response attributes Show response attributes object
    • id string

      Unique identifier for the message

    • requestId string

      The ID of the request this message belongs to

    • channel string

      Message channel. Internal messages are interface-only; email and SMS are sent to the contact.

      Values are internal, email, or sms.

    • title string

      Title/subject. Used for internal and email; for email must be at least 10 characters. Not used for SMS.

    • text string | null

      Message content for internal channel only (supports markdown). Can be null if no text. Raw HTML is not allowed and all content is sanitized to prevent XSS attacks.

    • body string

      Message body for email and SMS channels. Must be at least 20 characters when creating or updating.

    • status string

      For email/SMS only. e.g. pending, paused, sending, sent, opened, clicked, creditMissing, phoneError

    • sendOn string(date-time)

      For email/SMS only. When the message is (or was) scheduled to be sent (ISO 8601, UTC).

    • createdAt string(date-time)

      When the message was created (ISO 8601 format, UTC)

    • updatedAt string(date-time)

      When the message was last updated (ISO 8601 format, UTC). Present for internal messages.

  • 401

    Unauthorized -- Your API key is wrong.

  • 403

    Forbidden -- The object requested is hidden for administrators only.

  • 404

    Not Found -- The specified object could not be found.

  • 429

    Too Many Requests -- You're requesting too many objects! Slow down!

  • 500

    Internal Server Error -- We had a problem with our server. Try again later.

  • 503

    Service Unavailable -- We're temporarily offline for maintenance. Please try again later.

GET /requests/{requestId}/messages
curl \
 --request GET 'https://api.usecollect.com/v1/requests/{requestId}/messages' \
 --user "username:password"
Response examples (200)
[
  {
    "id": "msg_123",
    "text": "Here is the response generated by the agent...",
    "title": "AI Agent - reply sent",
    "channel": "internal",
    "createdAt": "2026-01-21T10:12:46Z",
    "requestId": "req_456",
    "updatedAt": "2026-01-21T10:12:46Z"
  },
  {
    "id": "msg_124",
    "body": "Your message body",
    "title": "Your email subject",
    "sendOn": "2026-02-06T10:00:00Z",
    "status": "pending",
    "channel": "email",
    "createdAt": "2026-02-06T09:00:00Z",
    "requestId": "req_456"
  }
]