Add a System Prompt

Adds a system prompt language pack. The language pack file resource is uploaded through the upload credential flow and must be a .tar file. This interface is visible only to platform administrators.

Request URL

POST {base_url}/uc-cconfig/api/v1/sounds/system-prompts

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
language No String The language code of the system prompt, such as en and zh.
resourceId No String The ID of the language pack file resource, which is uploaded through the ResourceService in advance.

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<System_Prompt_Detail> The created system prompt.
System_Prompt_Detail
Parameter Type Description
id String The ID of the system prompt.
ownershipLevel String

The ownership level of the system prompt:

  • OWNERSHIP_LEVEL_SYSTEM
  • OWNERSHIP_LEVEL_PLATFORM
language String The language of the system prompt.
isDefault Boolean

Whether the system prompt is the default prompt.

  • true
  • false
resourceId String The ID of the language pack file resource in the resource service.
fileSize String The size of the language pack file, in bytes.
version String The version of the system prompt.
canDelete Boolean

Whether the system prompt can be deleted.

  • true
  • false
createdAt String The time when the system prompt was created, in Unix timestamp format (milliseconds).
updatedAt String The time when the system prompt was last updated, in Unix timestamp format (milliseconds).
used Boolean

Whether the system prompt is in use.

  • true
  • false
referencedTenantCodes Array<String> The list of tenant codes that reference the system prompt.