Skip to main content
POST
Import a Skill
Using our API via a dedicated deployment? Just replace api.langdock.com with your deployment’s base URL: <deployment-url>/api/public
Imports a Skill from a SKILL.md file or a zip archive. Use this endpoint to sync repository-managed Skills into Langdock.

Required Scopes

This endpoint requires the SKILL_API scope.
Creating a new Skill requires the createSkills workspace permission. Updating an existing Skill with mode: "upsert" requires editor access to the matching Skill.

Request Format

Send the request as multipart/form-data.

SKILL.md Format

The imported Skill must include YAML frontmatter followed by instructions:
SKILL.md

Zip archive rules

Zip archives must contain a SKILL.md file at the root or inside one top-level directory. Langdock stores allowed supporting files with the Skill and skips unsupported file types. Supported supporting file types include Markdown, text, Python, shell, JavaScript, TypeScript, JSON, YAML, TOML, CSV, XML, HTML, CSS, SVG, PDF, Office files, fonts, and common image formats.

Import Modes

When an upsert updates an existing Skill, imported files replace the Skill’s existing stored files.

Example

Response Format

Success Response (200 OK or 201 Created)

200 OK means an existing Skill was updated through upsert. 201 Created means a new Skill was created.

Error Handling

Langdock intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on API Key Best Practices.

Authorizations

Authorization
string
header
required

API key as Bearer token. Format "Bearer YOUR_API_KEY"

Body

multipart/form-data
file
file
required

SKILL.md, .zip, or .skill file content.

fileType
enum<string>
required

File parser to use.

Available options:
md,
zip
mode
enum<string>
default:create

Whether to create a Skill or update an editable Skill with the same slug.

Available options:
create,
upsert
integrationIds
string

JSON-encoded array of integration UUIDs.

Response

Existing Skill updated successfully

skill
object
required
files
object[]
required