Record a Sound Element

Records an audio element. This is the unified entry for creating and re-recording a custom prompt or a music-on-hold playlist item. The system calls the specified mobile phone, and the recording is saved after the call.

Request URL

POST {base_url}/uc-cconfig/api/v1/sounds/elements/record

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.
Body parameters
Parameter Required Type Description
soundType No String

The type of the audio element.

Valid value:

  • SOUND_TYPE_CUSTOM_PROMPT: A custom prompt.
  • SOUND_TYPE_MOH_ITEM: A music-on-hold playlist audio item.
  • SOUND_TYPE_VOICEMAIL_GREETING: A voicemail greeting.
id No String The ID of the audio element. The value 0 or omitting this parameter creates a new recording, and a value greater than 0 re-records the element. Re-recording is supported only when sourceType is SOURCE_TYPE_USER_RECORD.
name No String The name of the audio element. This parameter is required when a new recording is created, and is ignored when re-recording.
containerId No String The container ID. This parameter is required when soundType is SOUND_TYPE_MOH_ITEM (the MOH playlist ID), and is not used when soundType is SOUND_TYPE_CUSTOM_PROMPT.
sourceType No String

The source of the audio element.

Valid value:

  • SOURCE_TYPE_UPLOAD: The audio file is uploaded.
  • SOURCE_TYPE_USER_RECORD: The audio file is recorded from a mobile phone.
extension No String The extension number of the recording mobile phone.
text No String The text content, which is reserved for the text-to-speech preview of MOH items.
panelSource No String The panel module to filter by. This parameter is used only by the voicemail panel, and the value is user_mailbox. It is used when a new recording is created.
panelResourceId No String The resource ID of the panel module. It is used when a new recording is created.

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.
  • 200: Request succeeded.
  • Non-200 value: Request failed.
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 The result of the operation.