Creates a custom Skill from a ZIP package. The initial version is 1.0.
Endpoint
POST /api/v1/skills
Uploads a ZIP package as multipart/form-data to create a custom Skill. The initial version is 1.0.
This API only creates a new Skill. To upload a new version for an existing Skill, use Create a version.
Request parameters
| Form field | Type | Required | Description |
|---|---|---|---|
| file | file | Yes | Skill package. Must be a .zip file no larger than 50MB |
| display_name | string | No | Display name. If omitted or blank, the name in SKILL.md is used |
| display_description | string | No | Display description. If omitted or blank, the description in SKILL.md is used |
SKILL.md, and the Front Matter must contain name and description.
Response
Returns a SkillDTO. After creation, latest_version is 1.0. After the security scan is submitted, status is checking. If no scan task is created, it is active.
| Field | Type | Description |
|---|---|---|
| id | string | Unique Skill ID |
| display_name | string | Display name |
| display_description | string | Display description |
| source | string | Always customer |
| status | string | checking or active |
| latest_version | string | Latest version number |
| classification | string / null | Always null. Custom Skills have no classification |
| meta_info | object / null | Always null. Custom Skills have no metadata |
| created_at | string | Creation time |
| updated_at | string | Update time |
Example
Errors
| HTTP status | error_code | Description |
|---|---|---|
| 401 | WORKSPACE_ID_ILLEGAL | Identity information is missing or invalid |
| 400 | SKILL_FILE_IS_NULL | file is not uploaded or the file is empty |
| 400 | SKILL_FILE_FORMATER_ERROR | The file extension is not .zip, or the file header is not in ZIP format |
| 400 | SKILL_PACKAGE_TOO_LARGE | The ZIP package exceeds 50MB |
| 400 | INVALID_PARAMETER | The multipart request is malformed |
| 500 | SKILL_FILE_FORMATER_ERROR | SKILL.md is missing, or the Front Matter lacks name or description |
| 500 | SKILL_NAME_OFFICIAL_DUPLICATE | The name in SKILL.md duplicates an official Skill |
| 500 | SKILL_NAME_CUSTOMER_DUPLICATE | The name in SKILL.md duplicates a custom Skill in the current workspace |
| 500 | SKILL_PACKAGE_TOO_LARGE | The uncompressed content exceeds 100MB |