---
title: "Patch Skill Endpoint"
method: PATCH
path: "/v1/skills/{skill_id}"
tags: ["Skills"]
---

# Patch Skill Endpoint

`PATCH /v1/skills/{skill_id}`

## Request

- Base URL: `https://api.pharia.example.com`
- URL: `https://api.pharia.example.com/v1/skills/{skill_id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/aleph-alpha/apis/stateful-responses/docs/v1/skills/:skill_id/patch.ts> (a function with typed inputs; its response is checked against the schema)

Replace the content of a skill's default version in place.

Structurally identical to ``POST /v1/skills`` — a multipart bundle upload
(directory parts or a zip) — but instead of creating a new skill or version
it overwrites the skill's current default version: both its SKILL.md front
matter (manifest) and the stored file bytes. It does NOT create a new
version; use ``POST /v1/skills/{skill_id}/versions`` for that.

## Path parameters

- `skill_id` string, required

## Response `200`

Successful Response

- SkillResponse: API response schema for a skill (excludes internal ownership fields). ``metadata`` mirrors the ``default_version`` manifest's ``metadata`` map so callers can read per-skill flags from the list without an extra request per skill to fetch the version manifest.
  - `id` string, required
  - `object` 'skill'
  - `name` string, required
  - `description` string, required
  - `metadata` object
  - `default_version` integer, required
  - `latest_version` integer, required
  - `created_at` integer, required
  - `is_active` boolean

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `413`: Content Too Large
- `422`: Validation errors are returned as 400, not 422. This entry exists because FastAPI generates it automatically.
- `425`: Too Early
- `500`: Internal Server Error
- `501`: Not Implemented
- `502`: Bad Gateway
- `504`: Gateway Timeout

---

[API](https://skmtc.dev/aleph-alpha/apis/stateful-responses.md) - [All operations](https://skmtc.dev/aleph-alpha/apis/stateful-responses/llms.txt) - [OpenAPI document](https://skmtc.dev/aleph-alpha/apis/stateful-responses/revisions/2747297acb54?raw)
