Submit visitor feedback

201 confirms a feedback record ID only, without regeneration. Omitting both message/task records conversation-level feedback. Mismatched targets are treated as publicly unavailable.

POST https://api.moi.matrixorigin.cn/v5/public/webapp/feedback

Before you call this API

Set BASE_URL to the product API prefix https://api.moi.matrixorigin.cn/v5. For private deployments, use the corresponding product API URL.

Prepare links and visitor identity in the same environment. Do not supply a product PAT or Workspace request header.

Request

curl --request POST \
  "$BASE_URL/public/webapp/feedback?webapp=$AGENT_ID&t=$WEBAPP_TOKEN&s=$WEBAPP_SESSION" \
  --header "Content-Type: application/json" \
  --data @- <<JSON
{"conversation_id": "${CONVERSATION_ID}", "rating": "up", "comment": "回答有帮助"}
JSON

Parameter

Location

Type

Required

Description

webapp

Queries

string

Yes

Agent ID corresponding to the link.

t

Queries

string

Yes

Current valid publication token. For short-code links, resolve first and use the short code as t.

s

Queries

string

Yes

Visitor session credentials under the same publication.

conversation_id

Body

string

Yes

Current visitor’s active conversation ID.

rating

Body

string

Yes

up/down/neutral。

comment

Body

string

No

At most 2000 Unicode characters.

message_id

Body

string

No

Agent response message ID within this conversation.

task_id

Body

string

No

When supplied, identifies the canonical response for this task. If message_id is also supplied, it must match.

Successful response

{
  "code": 0,
  "data": {
    "feedback_id": "feedback-example"
  }
}

Success returns HTTP 201 with numeric code=0. Read data’s Object descriptions with the example; the conversation-creation example shows a field excerpt only.

Error responses

Public errors and identity handling distinguishes unavailable links, disablement, invalid sessions, parameters, and system failures.

Last updated on