Skill Files

Move skill file

Moves or renames a file. The root SKILL.md cannot be moved.

post/skills/{skill_id}/files/move

Request

  • Base URL
    https://api.metorial.com
  • Auth
    HTTP bearer

Path parameters

skill_idstring required

Unique identifier of the skill.

Headers

Metorial-Versionstring
Example:2025-01-01

Pin the dated API version for this request, e.g. 2025-01-01. Defaults to the version configured for the environment.

Request body

pathstring required

Path of the file inside the skill. A leading "/" is optional. Paths may contain letters, numbers, spaces and the characters . _ - ( ) $.

to_pathstring required

The new path of the file.

if_matchstring

Only apply the change if the file still has this etag. Omit to skip the check.

Example request

{
  "path": "/SKILL.md",
  "to_path": "/references/renamed.md"
}

Response

Successful response

object'skill.file_change' required

String representing the object's type

type'put' | 'delete' | 'move' required

The kind of change that was applied.

pathstring required

The resulting path of the file. For moves, this is the new path.

previous_pathstring nullable required

The path the file was moved from. Only set for moves.

Example response

{
  "file": {
    "path": "/SKILL.md"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.