Create a visitor Web app conversation¶
201 returns data.id, not conversation_id. See shared objects for the complete object; the example is a field excerpt. The agent must be active. A visitor binding is created after the tenant conversation write; binding failure may leave a publicly inaccessible record.
POST https://api.moi.matrixorigin.cn/v5/public/webapp/conversations
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/conversations?s=$WEBAPP_SESSION" \
--header "Content-Type: application/json" \
--data @- <<JSON
{"webapp": "${AGENT_ID}", "t": "${WEBAPP_TOKEN}"}
JSON
Parameter |
Location |
Type |
Required |
Description |
|---|---|---|---|---|
|
Queries |
string |
Yes |
Issued visitor session. |
|
Body |
string |
Yes |
Agent ID. |
|
Body |
string |
Yes |
Current publication credential. |
Successful response¶
{
"code": 0,
"data": {
"id": "conversation-example",
"workspace_id": "workspace-example",
"agent_workspace_id": "workspace-example",
"agent_id": "agent-example",
"title_user_edited": false,
"status": "active",
"purpose": "webapp",
"visibility": "visible",
"pinned": false,
"created_at": "2026-11-12T01:00:00Z",
"updated_at": "2026-11-12T01:00:00Z"
}
}
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.