创建触发话术节点的意图

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String CreateIntent

系统规定参数。取值:CreateIntent。

InstanceId String 361c8a53-0e29-42f3-8aa7-c7752d010399

实例id

IntentName String 是本人

意图名字

ScriptId String b06fad9a-cc74-4ab6-b3a5-8d062adebf2c

话术id

Utterances String ["是","是的","是啊","嗯嗯","是我","是我,有事吗","对,是","对的","对是我",""]

用户触发意图的回答文本列表

IntentDescription String 确定是本人的意图

意图描述

Keywords String

意图的关键字,在List接口可用于过滤查找的意图

返回数据

名称 类型 示例值 描述
Code String OK

接口状态码

HttpStatusCode Integer 200

http 状态码

IntentId String 390515b5-6115-4ccf-83e2-52d5bfaf2ddf

创建的意图id

Message String Success

接口提示信息

RequestId String 254EB995-DEDF-48A4-9101-9CA5B72FFBCC

请求id

Success Boolean true

是否成功

示例

请求示例

http(s)://[Endpoint]/?Action=CreateIntent
&<公共请求参数>
&InstanceId=174952ab-9825-4cc9-a5e2-de82d7fa4cdd
&ScriptId=63cc3b45-feb2-4676-a7d7-f717001fa1e1
&IntentName=留学目的地-美国
&Utterances=["美国","去美国"]
&Keywords=["留学美国"]

正常返回示例

XML 格式

<Code>OK</Code>
<HttpStatusCode>200</HttpStatusCode>
<IntentId>fa0e21e9-caab-4629-9121-1e341243d599</IntentId>
<RequestId>f7cdfae4-899b-4000-8d94-518f79cd5492</RequestId>
<Success>true</Success>

JSON 格式

{
    "Code": "OK",
    "HttpStatusCode": 200,
    "IntentId": "fa0e21e9-caab-4629-9121-1e341243d599",
    "RequestId": "f7cdfae4-899b-4000-8d94-518f79cd5492",
    "Success": true
}

错误码

HttpCode 错误码 错误信息 描述
500 InternalError An error occurred while processing your request. Please try again later. Submit a ticket if the error still exists. 内部错误。建议重试,如果多次重试报错请提交工单。
400 InvalidIntentName.Duplicated The specified IntentName already exists. 意图名称已经存在。请您更换一个名字。
404 NotExist.Instance The specified Instance does not exist. 指定的实例不存在。
404 NotExist.Script The specified Script does not exist. 指定的话术不存在。

访问错误中心查看更多错误码。