---
title: "Record a snapshot of a source"
method: POST
path: "/api/v1/agent/snapshots/source/{source_id}/snapshot"
tags: ["Agent"]
---

# Record a snapshot of a source

`POST /api/v1/agent/snapshots/source/{source_id}/snapshot`

## Request

- Base URL: `https://pcp.example.com`
- URL: `https://pcp.example.com/api/v1/agent/snapshots/source/{source_id}/snapshot`
- Auth: API key in header `Plakman-Agent-Token`

## Path parameters

- `source_id` string, required

## Request body

- SnapshotSourceSetSnapshotRequest: SnapshotSourceSetSnapshotRequest schema
  - `category` string, nullable
  - `creation_time` string, date-time, required
  - `data_classes` string[], nullable
  - `dataset` string, nullable
  - `environment` string, nullable
  - `items` integer, nullable
  - `name` string, nullable
  - `origin` string, nullable
  - `root` string, nullable
  - `size` integer, nullable
  - `snapshot_id` string, required
  - `tags` string[], nullable

## Response `200`

OK

## Other responses

- `400`: Bad Request _(validation or deserialization error)_
- `401`: Missing, invalid or expired credentials
- `403`: The caller may not do this
- `500`: Internal Server Error _(panics)_
- `default`

---

[API](https://skmtc.dev/plakar/apis/plakar-control-plane-api-v1.md) - [All operations](https://skmtc.dev/plakar/apis/plakar-control-plane-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/plakar/apis/plakar-control-plane-api-v1/revisions/2ac049494a01?raw)
