Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

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, and content_id must 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>"}.

Kind
Seller message
Customer message

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.

post
/messages/
Authorizations
AuthorizationstringRequired

Token credential sent in the Authorization header, in the form: Token <your-token>. Requires a staff (admin) account.

Body

One message to append to an existing conversation.

conversationintegerRequired

The identifier of the conversation to append to.

message_contentstring · max: 500Required

The message text. Must not be blank.

user_typestring · enumRequired

Whether the author writes as a guest or as a registered user.

Possible values:
content_typestring · enumRequired

Who writes the message — a customer (user) or the seller (datasource, staff only).

Possible values:
content_idinteger · min: 1Required

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.

Responses
201

The message was appended. The body echoes the request.

application/json

The appended message, echoing the request.

conversationintegerOptional

The identifier of the conversation.

message_contentstringOptional

The message text.

user_typestring · enumOptional

Whether the author wrote as a guest or as a registered user.

Possible values:
content_idintegerOptional

The identifier of the author.

content_typestring · enumOptional

Who wrote the message.

Possible values:
post/messages/
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?