Delete a Skill

Updated at:

Deletes a custom Skill and all its versions. The operation is irreversible.

Endpoint

DELETE/api/v1/skills/{skill_id}

Deletes a custom Skill and all its versions. The operation is irreversible. Agents that have mounted an older version are not affected.

Path parameters

skill_idstringRequired

Custom Skill ID

Response fields

Returns a SkillDeletedResponse.

idstring

ID of the deleted Skill

typestring

Always skill_deleted

Example

curl -X DELETE "https://{workspace_id}.cn-beijing.maas.aliyuncs.com/api/v1/skills/skill_abc123" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY"

Response example

{
  "success": true,
  "error_code": null,
  "error_msg": null,
  "data": {
    "id": "skill_abc123",
    "type": "skill_deleted"
  },
  "request_id": "15a89d4c-f142-4e00-a9f7-b088442417c9"
}

Error codes

HTTP statuserror_codeDescription
401WORKSPACE_ID_ILLEGALIdentity information is missing or invalid
400SKILL_ID_IS_NULLskill_id is blank
500SKILL_NOT_EXISTThe Skill does not exist, is deleted, or is inaccessible. A repeated delete returns this error
500SKILL_DELETE_OFFICIAL_NOT_ALLOWEDAttempted to delete an official Skill
500SKILL_DELETE_ERRORFailed to delete the Skill