Skip to content

Send a Return Message

Add a customer message to the conversation thread of a return (RMA) request. The return must belong to the authenticated customer. The created message comes back flagged isAdmin: false.

Endpoint

POST /api/shop/return-messages

Authentication

This endpoint requires an authenticated customer — send the storefront key and a customer Bearer token. See the Authentication page.

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
X-STOREFRONT-KEYYesYour storefront API key
AuthorizationYesBearer token (customer login required)

Request Body

json
{
  "return_id": 12,
  "message": "Any update on my return?"
}

Request Parameters

ParameterTypeRequiredDescription
return_idintegerYesId of the return to add the message to. Must belong to the authenticated customer.
messagestringYesThe message text.

File attachments

An optional file can be attached to the message by sending the request as multipart/form-data with a file field alongside the fields above.

Response Fields (201 Created)

FieldTypeDescription
idintegerNumeric message id.
rmaIdintegerId of the return the message belongs to.
messagestringThe message text.
isAdminbooleanfalse — the message was sent by the customer.
attachmentstringStored attachment path, or null.
attachmentUrlstringPublic URL of the attachment, or null.
createdAtstringISO 8601 message timestamp.

Status Codes

StatusMeaning
201 CreatedMessage added to the return conversation.
400 Bad Requestmessage is missing.
401 UnauthorizedMissing or invalid customer Bearer token.
403 ForbiddenMissing or invalid storefront key.
404 Not FoundThe return does not exist or is not the customer's.

Released under the MIT License.