Append a message to a conversation
Appends one message to an existing conversation. It never opens a conversation — use POST /conversations/ for that.
Who may call it. Staff, or the customer who owns the conversation (signed in as themselves). Any other caller posting into a conversation that is not theirs is refused with 403; that check runs after the body and the rules below are checked, so a 400 or 406 is reported first.
In whose name. content_type and content_id name the author:
datasource— writing as the seller. Only staff may, andcontent_idmust be the conversation's own data source.user— writing as a customer. A customer must use their own user id; staff may write in any customer's name.
Anything else is refused with 400 and {"non_field_errors": ["Users do not match."]}. A request without credentials is answered the same way, with 400 rather than 401.
What the conversation accepts. Refusals are answered with 406 and {"non_field_errors": "<message>", "error_code": "<code>"}.
review
Refused: conversation_100_9 (A review cannot be replied to.)
Refused: conversation_100_10 (A review is written once, not added to.)
question
Accepted — the seller's answer
Refused: conversation_100_10 (A question is written once, not added to.)
message
Accepted
Accepted
Effects. A seller message sets is_answered to true (recording marked_answered if it was false), records a replied event, e-mails the customer with the Conversation Replied template and emits the conversation_replied webhook. It is not moderated: on an approved question it appears on the storefront straight away, on a pending one as soon as the question is approved. A customer message sets is_answered to false, recording marked_unanswered if it was true.
message_content is limited to 500 characters, the same limit as when a conversation is opened; a longer message is refused with 400.
Requests are rate-limited under the send-message scope; see Conversation Messages.
Token credential sent in the Authorization header, in the form: Token <your-token>. Requires a staff (admin) account.
One message to append to an existing conversation.
The identifier of the conversation to append to.
The message text. Must not be blank.
Whether the author writes as a guest or as a registered user.
Who writes the message — a customer (user) or the seller (datasource, staff only).
The identifier of the author. For datasource, the conversation's own data source; for user, the caller's own user id unless the caller is staff.
The message was appended. The body echoes the request.
The appended message, echoing the request.
The identifier of the conversation.
The message text.
Whether the author wrote as a guest or as a registered user.
The identifier of the author.
Who wrote the message.
The body is invalid or names an author the caller may not use. Errors are field-keyed lists.
The token sent is invalid. A request with no credentials at all is not answered with 401 but with 400 (Users do not match.).
The caller is neither staff nor the customer who owns the conversation.
The conversation's kind does not accept the message. non_field_errors is a single string, not a list; match on error_code.
The caller has posted too many messages in the current window of the send-message scope.
POST /api/v1/remote/1/messages/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 136
{
"conversation": 5820,
"message_content": "Yes, it runs true to size.",
"user_type": "registered",
"content_type": "datasource",
"content_id": 8
}{
"conversation": 5820,
"message_content": "Yes, it runs true to size.",
"user_type": "registered",
"content_id": 8,
"content_type": "datasource"
}Last updated
Was this helpful?

