curl -sS -X DELETE "$BMA_BASE_URL/v1/skills/skl_agq7qo75pb6s5gqqjnxy4li4a4" \
-H "x-api-key: $BMA_API_KEY" \
-H "bma-workspace-id: $BMA_PROJECT_ID"{
"type": "skill_deleted",
"id": "skl_agq7qo75pb6s5gqqjnxy4li4a4"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"bma_error_code": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"bma_error_code": "<string>"
},
"request_id": "<string>"
}Delete a skill
Deletes a skill of the request workspace together with all of its versions: from then on it is absent from the skills list, every read of the skill or its versions is a 404, and the stored version archives are removed. Deleting is not idempotent: deleting a skill that is already deleted is a 404. A skill of another workspace or organization is a 404 like an unknown ID, and nothing is deleted.
Authorization: An organization API key (x-api-key: bma_org_v1_...), a personal access token (Authorization: Bearer bma_pat_v1_...), an OAuth access token, or a signed-in user’s dashboard token or session, with the workspace role admin or developer in the request workspace (organization owners and admins qualify in every workspace of their organization); operators and viewers get 403. The workspace is the one named by bma-workspace-id (or anthropic-workspace-id), otherwise the credential’s own workspace; a user credential names its organization with bma-organization-id.
Limits:
- No limits specific to this endpoint.
- Rate limit: one request of the organization’s write budget (Rate limits).
Errors (besides the common errors (401 authentication, 429 rate_limited, 500)):
| Status | error.type | error.code | Cause | Fix |
|---|---|---|---|---|
| 400 | invalid_request_error | organization_required | A user credential that is bound to no organization names none. | Correct the request as the message describes and send it again; the same request will keep failing. |
| 400 | invalid_request_error | project_required | The credential can use several workspaces and the request names none. | Name the workspace with the bma-workspace-id header. |
| 400 | invalid_request_error | workspace_id_conflict | bma-workspace-id and anthropic-workspace-id name different workspaces. | Correct the request as the message describes and send it again; the same request will keep failing. |
| 403 | permission_error | permission_denied | The caller’s workspace role is operator or viewer. | Use a credential with the required role or access; retrying with the same credential will not help. |
| 404 | not_found_error | not_found | No live skill with this ID exists in the request workspace (unknown, malformed, already deleted, or of another workspace). | Check the ID and the organization or workspace it belongs to; do not retry the same request. |
curl -sS -X DELETE "$BMA_BASE_URL/v1/skills/skl_agq7qo75pb6s5gqqjnxy4li4a4" \
-H "x-api-key: $BMA_API_KEY" \
-H "bma-workspace-id: $BMA_PROJECT_ID"{
"type": "skill_deleted",
"id": "skl_agq7qo75pb6s5gqqjnxy4li4a4"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"bma_error_code": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>",
"bma_error_code": "<string>"
},
"request_id": "<string>"
}