Skip to navigation

Send a trade message

Send a trade message.

Credential: Customer session

Before you call

  • A customer session for the same partner, integration, customer, wallet and chain.
  • A trade you own. You can send messages while it is CREATED, PAID or DISPUTED.

Sends a message as the owning customer while the trade is CREATED, PAID or DISPUTED. Provide text, one PNG or JPEG image of up to 3 MiB, or both. Sinbad trims the text, which can be up to 2,000 characters. Send plain base64 without a data URL prefix, and make the file bytes match contentType. This route accepts a JSON body of up to 5 MiB (5,242,880 decoded bytes). Sinbad stores images privately. Sending a chat image does not upload payment proof and does not mark the payment as sent. This POST has no idempotency guarantee, so a retry can create a duplicate message.

Confirm with Sinbad that this endpoint is enabled in your environment.

Errors

StatusCodeWhat to do
400VALIDATION_ERRORCorrect the fields reported in details before retrying.
401UNAUTHENTICATEDCreate a new customer session or use a valid server credential.
403FORBIDDENCheck credential ownership, integration and the supplied Origin.
404NOT_FOUNDCheck the resource ID. A resource that belongs to someone else also returns 404.
409CONFLICTRead the current state again before you prepare or retry.
503UPSTREAM_ERRORRetry with backoff; preserve the same idempotency key for a repeated mutation.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

tradeIdstringRequired

Request

Send at least one of: text, or image.

textstringOptional<=2000 characters
imageobjectOptional

Response

Saved text or image message; image metadata only.

messageIdstring
authorRoleenum
Allowed values:
textstring

Caption or message text; empty for image-only messages.

typeenum
Allowed values:
imageobject or null
createdAtdatetime or null
idstringOptional
Alias of messageId matching the app message field.
base64PreviewstringOptional
Small blurred JPEG preview, never original file bytes.
widthintegerOptional>=0
heightintegerOptional>=0
isUploadedbooleanOptional
attachmentUnavailablebooleanOptional

True when a stored attachment is missing or invalid. The message keeps its type, text and preview, with null image/attachment metadata and isUploaded false. Other messages and pagination remain available; the individual image route still rejects the unavailable attachment.

uploadStatusstring or nullOptional
attachmentobject or nullOptional

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
503
Service Unavailable Error