Skip to content
Svanja

Docs API reference

Skills

Find, read, save and run skills, and move them between Spaces as packages.

A skill is a SKILL.md file in a Space that tells the assistant how you want a job done. You can view them in Skills, or use these endpoints to read and save skills from your editor, run one as a task, or copy it to another Space. To read skills, your key needs the Skills area (included in Full access and Read-only). To save or run them, you need Full access or Skills set to Read and write. Because skills live in Spaces, a key limited to certain Spaces only sees the skills inside them. For more background, see Skills, tools and templates.

GET /skills lists the skills your key can reach, and GET /skills/source reads a skill’s SKILL.md file. To save one, use POST /skills or PATCH /skills/source. POST /skills/runs runs a skill and starts a task:

{
  "space_id": "SPACE_ID",
  "path": "skills/monthly-report/SKILL.md",
  "inputs": {}
}

POST /skills/exports packs a skill for download. Pass the skill’s location as query parameters, such as ?space_id=SPACE_ID&path=skills/monthly-report/SKILL.md. It returns 202 and finishes the export in the background.

POST /skills/imports brings skills into the Space specified by space_id. If you upload a skill package as multipart form data in the file field, Svanja prepares a preview that you review and finish in the app. To copy a skill from another of your Spaces instead, send source_space_id and the skill’s path. You will get a preview of the copy back; send the same request with "confirm": true to complete it. To do this from a terminal, see svanja skill.

Operations

An operation is one thing you can do, like reading a task or starting one. Its effect says what it changes. Some operations that act outside Svanja or change access wait for a person's approval; the approval flow is on the API overview.

skill.discover Reads only

Discover Skills.

GET /skills

skill.export Reads only

Export a Skill package.

POST /skills/exports

skill.import Changes data in Svanja

Import a Skill package.

POST /skills/imports

skill.invoke Changes data in Svanja

Invoke a Skill.

POST /skills/runs

skill.read Reads only

Read Skill source.

GET /skills/source

skill.save Changes data in Svanja

Save or update a Skill.

POST /skills PATCH /skills/source

Endpoints

Paths start at https://app.svanja.com/api/v1. Every endpoint needs an API key unless it says otherwise. A required Idempotency-Key header is listed with the parameters.

GET /skills Discover Skills
Parameter In Type Required Notes
q query string no
space_id query string no

Status codes: 200, 401, 403, 429

POST /skills Save a new Skill
Parameter In Type Required Notes
Idempotency-Key header string no Optional key for unsafe bearer writes. Reusing the same key and same canonical body replays the original response for 24 hours; reusing it with a different body returns idempotency_conflict.
Body field Type Required Notes
space_id string yes
path string no
name string no
description string no
content string no
expected_revision string or null no

Status codes: 200, 400, 401, 403, 409, 422, 429

GET /skills/source Read Skill source
Parameter In Type Required Notes
space_id query string yes
path query string yes

Status codes: 200, 401, 403, 404, 422, 429

PATCH /skills/source Update Skill source
Parameter In Type Required Notes
Idempotency-Key header string no Optional key for unsafe bearer writes. Reusing the same key and same canonical body replays the original response for 24 hours; reusing it with a different body returns idempotency_conflict.
Body field Type Required Notes
space_id string yes
path string no
name string no
description string no
content string no
expected_revision string or null no

Status codes: 200, 400, 401, 403, 404, 409, 422, 429

POST /skills/runs Invoke a Skill
Parameter In Type Required Notes
Idempotency-Key header string no Optional key for unsafe bearer writes. Reusing the same key and same canonical body replays the original response for 24 hours; reusing it with a different body returns idempotency_conflict.
Body field Type Required Notes
space_id string yes
path string yes
inputs object no
message string no

Status codes: 202, 400, 401, 403, 404, 409, 422, 429

POST /skills/imports Import a Skill package

Status codes: 202, 401, 403, 409, 422, 429

POST /skills/exports Export a Skill package

Status codes: 202, 401, 403, 404, 409, 422, 429

This page as plain Markdown, for AI tools: skills.md

Try Svanja with your own mailbox

Sign up now, and you get an email when your account is ready.