POST/v1/skills/{skill_id}/versions

Create a skill version

Creates a new version of a skill by uploading its files. Put all files in the same top-level directory and include SKILL.md at that directory's root. The response contains the created skill version and its generated identifier.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

3 parameters · 1 body field
skill_idstringrequired
The unique identifier of the skill to create a version for; the identifier format and length may change.
anthropic-versionstringoptional
The version of the Claude API to use for this request.
anthropic-workspace-idstringoptional
The Workspace ID to use when the credential can act on multiple Workspaces. If sent with a Workspace-specific credential, it must match that credential's Workspace.

Multipart form data containing the skill files.

filesarray<string>required
Files to upload for the skill. All files must be in the same top-level directory and must include a SKILL.md file at the root of that directory.

17 status codes
200Returns the created skill version object with its creation timestamp, description, version ID, name, skill ID, and object type.
created_atstringrequired
ISO 8601 timestamp of when the skill was created.
descriptionstringrequired
Description of the skill version. This is extracted from the SKILL.md file in the skill upload.
idstringrequired
Unique identifier for this Skill Version. The id addresses the version in paths and pins it in references.
namestringrequired
The Skill's immutable kebab-case slug, set at creation from the first upload's SKILL.md frontmatter `name` (or its enclosing directory). Every later upload must resolve to the same value. Also the top-level directory of the Skill's mounted files and the base name of a downloaded archive.
skill_idstringrequired
Unique identifier for the skill. The format and length of IDs may change over time.
typestringrequired
Object type. For Skill Versions, this is always `"skill_version"`.
Default:skill_version
400Returned when the request contains an invalid argument, including an invalid skill file upload.
errorobjectrequired
request_idstringrequired
Default:null
typestringrequired
Default:error
401Returned when the request does not have valid authentication credentials.
errorobjectrequired
request_idstringrequired
Default:null
typestringrequired
Default:error
403Returned when the caller does not have permission to perform the operation.
errorobjectrequired
request_idstringrequired
Default:null
typestringrequired
Default:error
404Returned when a requested entity is not found.
errorobjectrequired
request_idstringrequired
Default:null
typestringrequired
Default:error
408Returned when the deadline expires before the operation completes.
errorobjectrequired
request_idstringrequired
Default:null
typestringrequired
Default:error
409Returned when a concurrency issue aborts the operation.
errorobjectrequired
request_idstringrequired
Default:null
typestringrequired
Default:error
412Returned when the operation is rejected because the system is not in the required state.
errorobjectrequired
request_idstringrequired
Default:null
typestringrequired
Default:error
413Returned when the operation is attempted beyond a valid range.
errorobjectrequired
request_idstringrequired
Default:null
typestringrequired
Default:error
429Returned when a resource is exhausted, such as when the request is rate limited.
errorobjectrequired
request_idstringrequired
Default:null
typestringrequired
Default:error
431Returned when the request metadata is too large.
errorobjectrequired
request_idstringrequired
Default:null
typestringrequired
Default:error
499Returned when the client cancels the operation.
errorobjectrequired
request_idstringrequired
Default:null
typestringrequired
Default:error
500Returned when an internal server error occurs.
errorobjectrequired
request_idstringrequired
Default:null
typestringrequired
Default:error
501Returned when the operation is not implemented or supported.
errorobjectrequired
request_idstringrequired
Default:null
typestringrequired
Default:error
503Returned when the service is unavailable.
errorobjectrequired
request_idstringrequired
Default:null
typestringrequired
Default:error
504Returned when an upstream service does not respond in time.
errorobjectrequired
request_idstringrequired
Default:null
typestringrequired
Default:error
529Returned when the service is temporarily overloaded.
errorobjectrequired
request_idstringrequired
Default:null
typestringrequired
Default:error

Error handling

A 400 is returned for an invalid argument, a 401 when authentication credentials are invalid, and a 403 when the caller lacks permission. A 404 indicates that a requested entity was not found; a 408 indicates that the deadline expired; a 409 indicates a concurrency issue; a 412 indicates that a required system state was not met; and a 413 indicates that the operation exceeded a valid range. A 429 indicates resource exhaustion, a 431 that request metadata was too large, a 499 that the client cancelled the operation, a 500 an internal error, a 501 an unsupported operation, a 503 that the service is unavailable, a 504 an upstream timeout, and a 529 temporary service overload. The skill_id path parameter must identify the skill, and files must contain files from one top-level directory with SKILL.md at its root.