创建访客Web应用会话¶
201返回data.id,不是conversation_id。完整对象见公共对象,示例为字段摘录。智能体须处于active;租户会话写入后另建访客绑定,绑定失败可留下公开不可达记录。
POST https://api.moi.matrixorigin.cn/v5/public/webapp/conversations
调用前准备¶
BASE_URL 使用产品 API 前缀 https://api.moi.matrixorigin.cn/v5;专有部署填写对应的产品 API 地址。
准备同环境链接和访客身份。不填产品PAT或工作区请求头。
请求¶
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
参数 |
位置 |
类型 |
必填 |
说明 |
|---|---|---|---|---|
|
查询 |
string |
是 |
已签发访客session。 |
|
请求体 |
string |
是 |
智能体ID。 |
|
请求体 |
string |
是 |
当前发布凭据。 |
成功响应¶
{
"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"
}
}
成功 HTTP 201;数值 code=0。data 的对象说明与示例配合阅读;创建会话示例仅为字段摘录。
错误响应¶
公开错误与身份处理区分链接不可用、停用、session失效、参数和系统故障。
最后更新于