Creating a Skill Package
Function
This API is used to upload a new version skill package for an enterprise-developed skill.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
workspace:skillPackage:create
Write
-
-
-
-
URI
POST /v3/ai-agents/skills/{skill_id}/packages
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| skill_id | Yes | String | Skill ID. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Language | No | String | Language, which is used for internationalization. |
| X-Client-Token | No | String | Idempotency key, in UUID format. Creation APIs carry this request header, and the server implements idempotence control based on this header. The response header returns the same value. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| version | Yes | String | Version. |
| package_name | Yes | String | Name of the skill package file (the same as the value of packageName in getUploadUrls). The server constructs the OBS path based on the value. |
| package_hash | Yes | String | SHA-256 hash value of the skill package (calculated before the frontend uploads the package). |
| package_size | Yes | Long | Size of the skill package, in bytes. |
| regions | Yes | Array of PackageRegionWithStatusInfo objects | Region information (including the upload status). |
| remark | No | String | Remarks. |
Response Parameters
Status code: 201
| Parameter | Type | Description |
|---|---|---|
| X-Request-Id | String | - |
| Parameter | Type | Description |
|---|---|---|
| id | String | Skill package ID. |
| skill_id | String | Skill ID. |
| version | String | Version. |
| revision | Integer | Version revision number. |
| package_hash | String | SHA-256 hash value of the skill package. |
| package_size | Long | Size of the skill package, in bytes. |
| package_status | String | Skill package status. |
| uploaded_by | String | Uploader. |
| uploaded_role | String | Role of the uploader. |
| regions | Array of SkillPackageRegionItem objects | Region details list. |
| remark | String | Remarks. |
| create_time | String | Creation time (UTC time in ISO 8601 format). |
| update_time | String | Update time (UTC time in ISO 8601 format). |
| Parameter | Type | Description |
|---|---|---|
| region | String | Region ID. |
| obs_bucket | String | OBS bucket name. |
| obs_object_key | String | OBS object key. |
| upload_status | String | Upload status. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| X-Request-Id | String | - |
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 401
| Parameter | Type | Description |
|---|---|---|
| X-Request-Id | String | - |
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 403
| Parameter | Type | Description |
|---|---|---|
| X-Request-Id | String | - |
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 404
| Parameter | Type | Description |
|---|---|---|
| X-Request-Id | String | - |
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| X-Request-Id | String | - |
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Example Requests
/v3/ai-agents/skills/skill-uuid-002/packages
{
"version" : "2.0.0",
"package_name" : "internal-doc-helper-2.0.0.zip",
"package_hash" : "sha256-def456...",
"package_size" : 62914560,
"regions" : [ {
"region" : "cn-north-7",
"upload_status" : "UPLOADED"
} ],
"remark" : "New version upload"
} Example Responses
Status code: 201
{
"id" : "pkg-uuid-011",
"skill_id" : "skill-uuid-002",
"version" : "2.0.0",
"revision" : 1,
"package_hash" : "sha256-def456...",
"package_size" : 62914560,
"package_status" : "PUBLISHED",
"uploaded_by" : "tenant-user",
"uploaded_role" : "TENANT_ADMIN",
"regions" : [ {
"region" : "cn-north-7",
"obs_bucket" : "wks-skills-cn-north-7",
"obs_object_key" : "skills/internal-doc-helper/2.0.0/internal-doc-helper-2.0.0.zip",
"upload_status" : "UPLOADED"
} ],
"remark" : "New version upload",
"create_time" : "2026-06-01T10:00:00Z",
"update_time" : "2026-06-01T10:00:00Z"
} Status Codes
| Status Code | Description |
|---|---|
| 201 | Created |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 500 | Internal Server Error |
Error Codes
See Error Codes.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot