Skip to content

Send a trade message ​

http
POST /api/trades/:id/messages
Content-Type: multipart/form-data

User (buyer, seller or admin)

Form fields ​

FieldTypeRules
contenttext, optional≤ 2,000 chars, trimmed
imagefile, optionalJPEG, PNG or WebP by content; ≤ 5 MB

At least one is required.

bash
curl -X POST "$API/api/trades/$TRADE/messages" \
  -H "Authorization: Bearer $TOKEN" \
  -F "content=Paid, receipt attached" \
  -F "image=@receipt.png"

Response 201 ​

The created message (see list messages). A message:new event is emitted to the trade room.

Errors ​

StatusCodeCause
400BAD_REQUESTEmpty message, or file isn't a supported image
400UPLOAD_ERROR"Image must be 5 MB or smaller"
403FORBIDDEN
409CONFLICT"Chat for this trade is closed" (24 h after the trade ended)

Nexlm is a peer-to-peer facilitator and never holds customer Naira.