curl -sS -X DELETE "$BMA_BASE_URL/v1/skills/skl_agq7qo75pb6s5gqqjnxy4li4a4/versions/skr_agraiijgy55wfjpqnqpd3czpsa" \
-H "x-api-key: $BMA_API_KEY" \
-H "bma-workspace-id: $BMA_PROJECT_ID"{
"type": "skill_version_deleted",
"id": "skr_agraiijgy55wfjpqnqpd3czpsa"
}{
"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 version
Deletes one version of a skill of the request workspace, by its skr_ ID or as latest, and removes its stored archive. Any version may go while another remains; when the deleted one was the latest, the newest remaining version becomes the skill’s latest_version_id, and the skill’s updated_at changes. Its bma_revision is never given to a later version. The only remaining version cannot be deleted (400 without an error.code): upload a replacement first, or delete the skill. Deleting is not idempotent: a version that is already deleted, unknown or malformed is a 404 without an error.code.
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, 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/versions/skr_agraiijgy55wfjpqnqpd3czpsa" \
-H "x-api-key: $BMA_API_KEY" \
-H "bma-workspace-id: $BMA_PROJECT_ID"{
"type": "skill_version_deleted",
"id": "skr_agraiijgy55wfjpqnqpd3czpsa"
}{
"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>"
}