curl -sS -X POST "$BMA_BASE_URL/v1/skills/skl_agq7qo75pb6s5gqqjnxy4li4a4/versions" \
-H "x-api-key: $BMA_API_KEY" \
-H "bma-workspace-id: $BMA_PROJECT_ID" \
-F "files=@(contents of pdf-tools/SKILL.md)" \
-F "files=@(contents of pdf-tools/scripts/extract.py)" \
-F "files=@(contents of pdf-tools/scripts/tables.py)"{
"type": "skill_version",
"id": "skr_agraiijgy55wfjpqnqpd3czpsa",
"skill_id": "skl_agq7qo75pb6s5gqqjnxy4li4a4",
"name": "pdf-tools",
"description": "Extract text and tables from PDF files with the bundled scripts.",
"created_at": "2026-11-22T16:40:11.207593Z",
"bma_revision": 2
}{
"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>"
}Create a skill version
Uploads a new version of an existing skill of the request workspace as multipart/form-data files parts (the archive, display_name and bma_owner parts of create are not accepted here). The SKILL.md frontmatter name must equal the skill’s name (bma_name); the top-level directory itself is not checked against it. The new version gets the next bma_revision (revisions of deleted versions are never reused) and becomes the skill’s latest_version_id; the skill’s updated_at changes and its display_name stays. Idempotency-Key is honored as on create: for 24 hours the same key with the same files replays the first answer, with different files it is a 400, and while the first is still running a 409; a request refused before it ran or a 5xx frees the key. Without a key, an SDK retry (X-Stainless-Retry-Count of 1 or more) of the same upload within 10 minutes replays the first answer.
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:
- Upload size: at most 30 MiB (31,457,280 bytes) of file content in total, uncompressed; the whole request body at most 31 MiB. A larger upload is a 413
request_too_largewithout anerror.code. - File paths: relative,
/-separated, at most 4,096 bytes, each segment at most 255 bytes; no empty,.or..segment, no backslash or NUL, no path twice. - SKILL.md frontmatter (YAML between the first two
---lines):namerequired and equal to the skill’s name;descriptionrequired, non-blank, at most 1,024 bytes, without XML tags. Idempotency-Key: 1-255 visible ASCII characters; a completed key replays for 24 hours, a running one blocks the key for up to 10 minutes.- 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 | idempotency_key_reused | Idempotency-Key was already used with a different upload. | Correct the request as the message describes and send it again; the same request will keep failing. |
| 400 | invalid_request_error | invalid_idempotency_key | Idempotency-Key is empty, longer than 255 characters or not visible ASCII. | Correct the request as the message describes and send it again; the same request will keep failing. |
| 400 | invalid_request_error | invalid_request | The upload breaks a skill rule: SKILL.md missing from the top-level directory, missing or invalid frontmatter name or description, a frontmatter name that differs from the skill’s name, more than one top-level directory, or an invalid or repeated file path. The message names the rule. | Correct the request as the message describes and send it again; the same request will keep failing. |
| 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. |
| 409 | conflict_error | idempotency_key_in_use | A request with the same Idempotency-Key is still running. | Retry the same request after a short delay. |
curl -sS -X POST "$BMA_BASE_URL/v1/skills/skl_agq7qo75pb6s5gqqjnxy4li4a4/versions" \
-H "x-api-key: $BMA_API_KEY" \
-H "bma-workspace-id: $BMA_PROJECT_ID" \
-F "files=@(contents of pdf-tools/SKILL.md)" \
-F "files=@(contents of pdf-tools/scripts/extract.py)" \
-F "files=@(contents of pdf-tools/scripts/tables.py)"{
"type": "skill_version",
"id": "skr_agraiijgy55wfjpqnqpd3czpsa",
"skill_id": "skl_agq7qo75pb6s5gqqjnxy4li4a4",
"name": "pdf-tools",
"description": "Extract text and tables from PDF files with the bundled scripts.",
"created_at": "2026-11-22T16:40:11.207593Z",
"bma_revision": 2
}{
"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>"
}Headers
Path Parameters
Body
The version's files, one multipart part each (field name files or files[]); each part's filename is the file's relative path. Either all files sit in one top-level directory that holds SKILL.md (any letter case), or SKILL.md is at the root and the files are stored under a directory named after the skill.
Response
Success.
An immutable version of a skill, made by one upload.