---
title: "Upload a snapshot of the file"
method: PATCH
path: "/me/files/{fileName}"
tags: ["me"]
---

# Upload a snapshot of the file

`PATCH /me/files/{fileName}`

## Path parameters

- `fileName` string, required

## Request body

- SourceCodeWrapper
  - `content` string, required

## Response `200`

Snapshot uploaded successfully

- SnapshotSaveResponse
  - `result` 'newly_saved' | 'already_saved', required
  - `snapshot` SnapshotMeta, required
    - `id` string, required
    - `owner` string, required
    - `fileName` string, required
    - `version` integer, required
    - `license` string — SPDX license identifier
    - `registered` boolean
    - `createdAt` string, date-time, required

## Other responses

- `404` — File not found

## Changes

- **2026-07-17** `4ff151025f7c` — 1 warning, 2 info
  - changed the pattern of the `path` request parameter `fileName` from `/^[a-z\d](?:[a-z\d]|-(?=[a-z\d])){0,38}$/i` to `/^[a-z\d](?:[a-z\d]|[-_](?=[a-z\d])){0,38}$/i`
  - the `snapshot/fileName` response's property pattern was changed from `/^[a-z\d](?:[a-z\d]|-(?=[a-z\d])){0,38}$/i` to `/^[a-z\d](?:[a-z\d]|[-_](?=[a-z\d])){0,38}$/i` for the status `200`
  - the `snapshot/owner` response's property pattern was changed from `/^[a-z\d](?:[a-z\d]|-_(?=[a-z\d])){0,38}$/i` to `/^[a-z\d](?:[a-z\d]|-(?=[a-z\d])){0,38}$/i` for the status `200`
- **2025-02-09** `11f1b67626ff` — 1 info
  - the `snapshot/owner` response's property pattern was changed from `/^[a-z\d](?:[a-z\d]|-(?=[a-z\d])){0,38}$/i` to `/^[a-z\d](?:[a-z\d]|-_(?=[a-z\d])){0,38}$/i` for the status `200`
- **2025-02-06** `4b32864c1d82` — 1 info
  - added the optional property `snapshot/license` to the response with the `200` status
- **2025-01-26** `92dc510f35d6` — 5 breaking, 1 warning, 2 info
  - removed the required property `createdAt` from the response with the `200` status
  - removed the required property `fileName` from the response with the `200` status
  - removed the required property `id` from the response with the `200` status
  - removed the required property `owner` from the response with the `200` status
  - …4 more
- …earlier changes not shown

[Full history](https://skmtc.dev/lapisla-prover/apis/lapisla-prover-api/changes/me/files/:fileName/patch.md)

---

[API](https://skmtc.dev/lapisla-prover/apis/lapisla-prover-api.md) · [All operations](https://skmtc.dev/lapisla-prover/apis/lapisla-prover-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/lapisla-prover/lapisla-prover-api/revisions/4ff151025f7c/schema)
