Update Collect Information Skill Configuration
Updates the Collect Information (CI) skill configuration of an AI receptionist. The update is partial at the top level: a parameter set to null is not updated. When ciConfig is provided, the whole configuration is replaced rather than merged.
Request URL
PUT {base_url}/uc-ai/api/v1/receptionists/{id}/ci
Request parameters
- Headers
-
Parameter Required Type Description Authorization Yes String The access token used for authentication. Format: Bearer
{access_token}.x-tenant-code Yes String The tenant name. Note: You can obtain tenant name using the Query Tenants interface.
- Path parameters
-
Parameter Required Type Description id Yes String The ID of the AI receptionist. You can obtain the ID using the Search AI Receptionists interface.
- Body parameters
-
Parameter Required Type Description ciEnabled No Boolean Whether the Collect Information skill is enabled. If the value is null, the setting is not updated.ciConfig No Object<CI_Config> The detailed configuration of the skill. When specified, the whole configuration is replaced.
- CI_Config
-
Parameter Required Type Description trigger Yes String The trigger timing:
Valid value:
CALL_START: The skill is triggered when the call starts.BEFORE_TRANSFER: The skill is triggered before the call is transferred.ON_INTENT: The skill is triggered when one of the keywords occurs.
triggerKeywords No Array<String> The keywords that trigger the skill, up to 10 keywords. This parameter applies only when triggerisON_INTENT.useDefaultDescription No Boolean Whether the built-in default collection description is used. When true, thedescriptionvalue is ignored. Defaults tofalse.description No String The description of the information collection purpose, which is injected into the prompt. Maximum 1024 characters. fields No Array<CI_Field> The list of fields to collect.
- CI_Field
-
Parameter Required Type Description name Yes String The display name of the field, up to 127 characters. identifier No String The fixed identifier of the field. Specify this parameter only when an existing field or a built-in field is passed back. For a new custom field, omit it and the server assigns an identifier. type Yes String The value type, which can be string,boolean,integer, ornumber.required No Boolean Whether the field is mandatory. options No Array<String> The allowed values. This parameter applies only when typeisstring. An empty array means no restriction, and each element must be a string.prompt No String The prompt that tells the agent how to ask for the value. Maximum 1024 characters. format No String The format constraint, which can be EMAIL,DATE,PHONE,REGEX, orNONE. When the value isREGEX, thepatternparameter is required.pattern No String The custom regular expression. This parameter applies only when formatisREGEX.
Response parameters
| Parameter | Type | Description |
|---|---|---|
| requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
| code | String | The HTTP status code of the request.
|
| message | String | The status message of the request. |
| detailMessage | String | The detailed error information. When the request is successful, this parameter returns empty. |
| result | Object<CI_Configuration> | The updated Collect Information configuration. |
- CI_Configuration
-
Parameter Type Description ciEnabled Boolean Whether the Collect Information skill is enabled.
true: The skill is enabled.false: The skill is disabled.
ciConfig Object<CI_Config> The detailed configuration of the skill. fieldLimit Integer The maximum number of fields that can be configured.
- CI_Config
-
Parameter Type Description trigger String The trigger timing:
CALL_START: The skill is triggered when the call starts.BEFORE_TRANSFER: The skill is triggered before the call is transferred.ON_INTENT: The skill is triggered when one of the keywords occurs.
triggerKeywords Array<String> The keywords that trigger the skill. This parameter is used when triggerisON_INTENT.useDefaultDescription Boolean Whether the built-in default collection description is used.
true: The built-in description is used.false: Thedescriptionvalue is used.
description String The description of the information collection purpose. fields Array<CI_Field> The list of fields to collect.
- CI_Field
-
Parameter Type Description name String The display name of the field. identifier String The fixed identifier of the field. The built-in fields use nameandemail, and custom fields usefield_{n}. The value never changes once assigned.type String The value type:
STRINGBOOLEANINTEGERNUMBER
required Boolean Whether the field is mandatory.
true: The field is mandatory.false: The field is optional.
options Array<String> The allowed values. This parameter applies only when typeisSTRING.prompt String The prompt that tells the agent how to ask for the value. format String The format constraint:
EMAIL: Email format.DATE: Date format.PHONE: Phone number format.REGEX: A custom regular expression, which requirespattern.NONE: No format constraint.
pattern String The custom regular expression. This parameter applies only when formatisREGEX.builtin Boolean Whether the field is a built-in field.
true: The field is built-in.false: The field is custom.
Example
Request example
PUT /uc-ai/api/v1/receptionists/2108109589655433218/ci HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJkaXN0cmlidXRvcmV4YW1wbGVAb3V0bG9vay5jb20iLCJhcHBfa2V5Ijoic2xOdnQzaHc1NXB2Vm5HRlNhR2ZOVTNmMWxYQ3lpa08iLCJncmFudF90eXBlIjoib3BlbmFwaSIsImNsaWVudF9leHQiOnsiZGVzY3JpcHRpb24iOiLnrKzkuInmlrnlkIjkvZzkvJnkvLTlupTnlKgiLCJwYXJ0bmVyIjoi56S65L6L5ZCI5L2c5LyZ5Ly0In0sImNsaWVudF90eXBlIjoib3BlbmFwaSIsImV4cCI6MTc5MzcxMzk4OCwiaWF0IjoxNzkzNjkyMzg4LCJqdGkiOiJkNTQwMzU4Mi04OGJhLTQ4MWQtYWIwMi0xMzliZjQ3MDE1MWQiLCJjbGllbnRfaWQiOiJub3ZvLW9wZW4tcGxhdGZvcm0iLCJ1c2VyX2V4dCI6eyJyb2xlSWRzIjpbM10sInN0eXBlIjoiQURNSU4iLCJ0ZW5hbnRDb2RlIjpudWxsLCJ0eXBlIjoiUF9BQ0NPVU5UIiwidXNlcklkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJlbWFpbCI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInVzZXJuYW1lIjoiZGlzdHJpYnV0b3JleGFtcGxlQG91dGxvb2suY29tIiwidWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5Nn19.eWJT-EDHefoJ21uZDzuWS8tCW-1cV1aWNSopRPF_U5FPqy-qcZXdCiru_aAQHZJHCrIJn6Dp9m5DZA6n-tK8l7i3ckckgoXoGyNL-Kd7lCW4AsjALB8LPlr08YXJFGjki_Ukj4pkM1z_YSxGLZPr5luLtfttDzcHxjLGhZFtygn9P1XtySyipP-BfVe3uodwgv6aNSQ4fHl50XAJC2RmGFHn8wxPBQFca1cFmzEgklMRA9XBsOtYjT20q-sgJ_0oeGPEpO7uexjtovi5eA9fsuI4bYApxgbne60_Rk73o5J7B8CGoU_WOdf81rJ4CyN4-R573m0JmiTb9oiAMShGSQ
x-tenant-code: jint
Content-Type: application/json
{
"ciEnabled": true,
"ciConfig": {
"trigger": "CALL_START",
"useDefaultDescription": true,
"fields": [
{
"name": "Name",
"identifier": "name",
"type": "STRING",
"required": true,
"prompt": "May I have your name?",
"format": "NONE",
"builtin": true
},
{
"name": "Email",
"identifier": "email",
"type": "STRING",
"required": true,
"prompt": "May I have your email address?",
"format": "EMAIL",
"builtin": true
},
{
"name": "Company",
"type": "STRING",
"required": false,
"prompt": "Which company are you from?",
"format": "NONE"
}
]
}
}
Response example
HTTP/1.1 200 OK { "result": { "ciEnabled": true, "ciConfig": { "trigger": "CALL_START", "useDefaultDescription": true, "fields": [ { "name": "Name", "identifier": "name", "type": "STRING", "required": true, "prompt": "May I have your name?", "format": "NONE", "builtin": true }, { "name": "Email", "identifier": "email", "type": "STRING", "required": true, "prompt": "May I have your email address?", "format": "EMAIL", "builtin": true }, { "name": "Company", "identifier": "field_1", "type": "STRING", "required": false, "prompt": "Which company are you from?", "format": "NONE", "builtin": false } ] }, "fieldLimit": 5 }, "requestId": "a2a83d05d6b1173e6abd6f7b89acdcbe", "code": "200", "message": "SUCCESS" }
The new custom field Company has no identifier in the request, and the server assigns field_1 in the response. The response also returns fieldLimit, which is not declared in the API specification.