PATCH /requests/{requestId}/messages/{messageId}

Partially update a message. Only provided fields will be updated.

Setting text to null will clear the text field while leaving the title unchanged.

Path parameters

  • requestId string Required

    The ID of the request

  • messageId string Required

    The ID of the message

application/json

Body Required

  • title string

    The new title (must be non-null string if provided)

  • text string | null

    The new message content. Can be null to clear the text.

    Supports markdown formatting including bold, italic, headers, lists, code blocks, and links. Raw HTML is not allowed and all content is sanitized to prevent XSS attacks.

Responses

  • 200 application/json

    Message updated successfully

    Hide response attributes Show response attributes object
    • id string

      Unique identifier for the message (format: msg_xxx)

    • requestId string

      The ID of the request this message belongs to

    • title string

      The title/subject of the message

    • text string | null

      The message content (supports markdown). Can be null if no text.

      Supports markdown formatting including bold text, italic text, headers, lists, code blocks, and links. Raw HTML is not allowed and all content is sanitized to prevent XSS attacks.

    • 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)

  • 400

    Bad Request -- Your request is invalid.

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

PATCH /requests/{requestId}/messages/{messageId}
curl \
 --request PATCH 'https://api.usecollect.com/v1/requests/{requestId}/messages/{messageId}' \
 --user "username:password" \
 --header "Content-Type: application/json" \
 --data '{"text":"Updated body text...","title":"AI Agent - follow-up sent"}'
Request example
{
  "text": "Updated body text...",
  "title": "AI Agent - follow-up sent"
}
Response examples (200)
{
  "id": "msg_123",
  "text": "Updated body text...",
  "title": "AI Agent - follow-up sent",
  "createdAt": "2026-01-21T10:12:46.120Z",
  "requestId": "req_456",
  "updatedAt": "2026-01-21T10:20:01Z"
}