---
title: "POST /sites/{site_id}/database/snapshot"
method: POST
path: "/sites/{site_id}/database/snapshot"
tags: ["database"]
---

# POST /sites/{site_id}/database/snapshot

`POST /sites/{site_id}/database/snapshot`

Creates a point-in-time snapshot of a database branch. Defaults to the production branch if no branch name is specified.

## Request body

- CreateDatabaseSnapshotRequest — Request body for creating a database snapshot
  - `branch_id` string — The ID of the branch to snapshot. Defaults to "production" if not specified.
  - `name` string — A name for the snapshot
  - `metadata` DatabaseSnapshotMetadata — Metadata associated with a snapshot
    - `deploy` object — Deploy information associated with the snapshot
    - `source` string — The source that created the snapshot

## Response `201`

Created

- DatabaseSnapshot — A point-in-time snapshot of a database branch
  - `id` string — The unique identifier of the snapshot
  - `source_branch_id` string — The ID of the branch that was snapshotted
  - `manual` boolean — Whether this snapshot was manually created
  - `created_at` string, dateTime — When the snapshot was created
  - `expires_at` string, dateTime — When the snapshot expires
  - `timestamp` string, dateTime — The point-in-time timestamp of the snapshot
  - `metadata` DatabaseSnapshotMetadata — Metadata associated with a snapshot
    - `deploy` object — Deploy information associated with the snapshot
    - `source` string — The source that created the snapshot

## Other responses

- `default` — error

---

[API](https://skmtc.net/netlify/apis/netlify-s-api-documentation.md) · [All operations](https://skmtc.net/netlify/apis/netlify-s-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/netlify/netlify-s-api-documentation/versions/71540d1b5d9d/schema)
