Skip to main content

Delete a Skill

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.

Request parameters

ParameterTypeRequiredDescription
skill_idstringYesCustom Skill ID

Response

Returns a SkillDeletedResponse.
FieldTypeDescription
idstringID of the deleted Skill
typestringAlways 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"
{
  "success": true,
  "error_code": null,
  "error_msg": null,
  "data": {
    "id": "skill_abc123",
    "type": "skill_deleted"
  },
  "request_id": "15a89d4c-f142-4e00-a9f7-b088442417c9"
}

Errors

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