---
title: "Get skill file"
method: GET
path: "/skills/{skill_id}/files/content"
tags: ["Skill Files"]
---

# Get skill file

`GET /skills/{skill_id}/files/content`

## Request

- Base URL: `https://api.metorial.com`
- URL: `https://api.metorial.com/skills/{skill_id}/files/content`
- Auth: HTTP bearer

Retrieves a single skill file by path. Documents include their text content, other files include a download URL.

## Path parameters

- `skill_id` string, required

## Query parameters

- `path` string, required

## Headers

- `Metorial-Version` string

## Response `200`

Successful response

- SkillFileContent
  - `object` 'skill.file_content', required: String representing the object's type
  - `path` string, required: Path of the file inside the skill, always starting with "/".
  - `kind` 'document' | 'file', required: Markdown written with `content` is stored as a collaboratively editable document; everything else, including attached files, is stored as a file.
  - `size` number, required: Size of the file content in bytes.
  - `etag` string, required: Opaque version identifier of the file content. Pass it as `if_match` when writing to avoid overwriting changes made by others. The check is best-effort: a live collaborative edit landing between the check and the write is not detected. Listings do not flush pending live edits, so a listed etag can lag behind the one returned when fetching the file.
  - `skill_id` string, required: The ID of the skill the file belongs to.
  - `store_item_id` string, required: The ID of the store item backing this file.
  - `document_id` string, nullable, required: The ID of the backing document, for files of kind `document`.
  - `file_id` string, nullable, required: The ID of the backing file, for files of kind `file`.
  - `updated_at` string, date-time, required: When the file was last changed.
  - `content` string, nullable, required: The text content of the file, for files of kind `document`.
  - `download_url` string, nullable, required: A short-lived URL to download the file content, for files of kind `file`.

## Other responses

- `400`: Invalid parameters or action
- `401`: Missing or invalid API key
- `403`: The key lacks permission for this resource
- `404`: No such resource
- `422`: Validation failed
- `429`: Rate limit exceeded
- `500`: Unexpected server error

---

[API](https://skmtc.dev/metorial/apis/metorial-api.md) - [All operations](https://skmtc.dev/metorial/apis/metorial-api/llms.txt) - [OpenAPI document](https://skmtc.dev/metorial/apis/metorial-api/revisions/10ccc89f3eac?raw)
