Snapshot

Creates a snapshot from the specified branch. This operation may initiate an asynchronous process.

post/projects/{project_id}/branches/{branch_id}/snapshot

Request

  • Base URL: https://console.neon.tech/api/v2
  • URL: https://console.neon.tech/api/v2/projects/{project_id}/branches/{branch_id}/snapshot
  • Auth: one of:
    • HTTP bearer
    • API key in cookie zenith
    • API key in cookie keycloak_token

Query parameters

lsnstring

The target Log Sequence Number (LSN) to take the snapshot from. Must fall within the restore window. Cannot be used with timestamp

timestampstring
Example:2025-08-05T22:00:00Z

The target timestamp for the snapshot. Must fall within the restore window. RFC 3339 format. Cannot be used with lsn.

namestring

A name for the snapshot.

expires_atstring
Example:2025-08-05T22:00:00Z

The time at which the snapshot will be automatically deleted. RFC 3339 format.

Response

Successfully created the snapshot

Example response

{
  "snapshot": {
    "created_at": "2025-01-15T10:30:00Z"
  },
  "operations": [
    {
      "id": "d8ac46eb-a757-42b1-9907-f78322ee394e",
      "project_id": "spring-example-302709",
      "branch_id": "br-wispy-meadow-118737",
      "endpoint_id": "ep-silent-smoke-806639",
      "action": "start_compute",
      "status": "finished",
      "failures_count": 0,
      "created_at": "2022-11-15T20:02:00Z",
      "updated_at": "2022-11-15T20:02:02Z",
      "total_duration_ms": 200
    }
  ]
}

Changes

    • ●

      deleted the query request parameter slug

    • ●

      removed the optional property / from the response with the status

    • ○

      added the new optional query request parameter slug

    • ○

      added the optional property / to the response with the status