Record a Custom Prompt

Record a custom prompt through placing a call to a specified extension.

Request URL

GET {base_url}/{api_path}/custom_prompt/record?file={file}&recorder={recorder}&access_token={access_token}

Request parameters

Parameter Required Type Description
file Yes String The filename of the prompt without file extension.
recorder Yes String The number of the extension used to record the prompt.
id No Integer The ID of the custom prompt.
Note:
  • You can query the ID using Search Custom Prompts.
  • Once the parameter is included in the request, the existing prompt is re-recorded.

Response parameters

Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.

Example

Request example

GET /openapi/v1.0/custom_prompt/record?file=doc_demo_rec&recorder=1002&access_token=gwakjgu9ZBUfz36wql4ndsVKkryI0kdj HTTP/1.1
Host: 192.168.5.150:8088

Response example

HTTP/1.1 200 OK
{
  "errcode": 0,
  "errmsg": "SUCCESS"
}