---
title: "Add or replace one file of a skill. multipart/form-data: path, executable, expected_revision_id, and file or text"
method: POST
path: "/api/preview/capsules/{id}/skill-files"
tags: ["capsule"]
---

# Add or replace one file of a skill. multipart/form-data: path, executable, expected_revision_id, and file or text

`POST /api/preview/capsules/{id}/skill-files`

## Request

- Base URL: `https://symbol.chat` (the document declares no server; this is the origin it was published from)
- URL: `https://symbol.chat/api/preview/capsules/{id}/skill-files`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `__Secure-next-auth.session-token`
  - OAuth 2
    - Authorization code: `https://mcp.symbol.chat/authorize`
    - Token URL: `https://mcp.symbol.chat/token`
- TypeScript: <https://skmtc.dev/symbol-chat/apis/symbol-api/docs/api/preview/capsules/:id/skill-files/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `id` string, required: UUID v4 string

## Response `200`

Successful response

- object
  - `evicted_revisions` integer, required
  - `file` object, nullable, required
    - `executable` boolean, required
    - `is_text` boolean, required
    - `path` string, required: Path relative to the skill folder, with forward slashes (e.g. `scripts/run.sh`).
    - `revision_id` string, required: UUID v4 string
    - `sha256` string, required
    - `size` integer, required
    - `source_kind` 'stored' | 'linked', required
    - `updated_at` string, required
  - `usage` object, required
    - `current_bytes` integer, required
    - `history_rows` integer, required
    - `path_count` integer, required
    - `retained_bytes` integer, required

## Changes

- **2026-11-08** `fd7b0a7085e4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/symbol-chat/apis/symbol-api/changes/api/preview/capsules/:id/skill-files/post.md)

---

[API](https://skmtc.dev/symbol-chat/apis/symbol-api.md) - [All operations](https://skmtc.dev/symbol-chat/apis/symbol-api/llms.txt) - [OpenAPI document](https://skmtc.dev/symbol-chat/apis/symbol-api/revisions/24536ef7ac40?raw)
