Post a merchant message on a case
to try read requests with your account, or paste an API key into the Authorization field. Create an API key in the Partner Portal.
Adds a reply from your organization to an open case. If the case was waiting on you, your reply hands it back to Prets. Send your own messageId to retry safely.
Returns the posted message. A retry with the same messageId and body returns the original message without posting it twice. Returns 409 when the case is closed or the messageId is already used with a different body, and 404 when the case does not exist or is not visible to you.
caseId*stringPlatform case id (cas_{ULID})
^cas_[0-9A-HJKMNP-TV-Z]{26}$application/json- body
Opening or reply message body. Optional client ULID for idempotent create.
messageId?stringClient-generated id (csmsg_{ULID}). When provided the server uses it as the canonical message id, enabling optimistic UI.
^csmsg_[0-9A-HJKMNP-TV-Z]{26}$body*stringPlain-text message body (max 32,000 characters, per Salesforce long text area)
1 <= length <= 32000The posted message
application/json- response
The message that was posted
data*One message in a Case conversation. Immutable through the API; erasure is a tombstone.
bearerAuthAuthorizationBearer <token>curl -X POST 'https://api.prets.app/v1/cases/cas_01ARZ3NDEKTSV4RRFFQ69G5FAV/messages' \ -H 'Content-Type: application/json' \ -d '{ "body": "The customer asked to move the appointment to next week."}'{ "data": { "messageId": "csmsg_01ARZ3NDEKTSV4RRFFQ69G5FAV", "body": "We have received your request.", "author": { "type": "merchant", "contactId": "con_01HYQ4R7T0WKM2XB8ZFPC3NDV9", "name": "Jane Advisor" }, "createdAt": "2024-12-31T14:30:00.000Z", "redactedAt": "2026-08-16T07:10:00.000Z" }}