Create a Valkey snapshot by instance ID

Create a snapshot of the Valkey instance in valkey_id. The snapshot is returned as pending.

POST https://{availability_zone}.betterstackcloud.com/v1/valkey-snapshots
Authorization string required

Bearer $TOKEN

Content-Type string

application/json

valkey_id string required

The ID of the Valkey instance to create a snapshot of.

name string

The snapshot's name. Defaults to the instance's name and the date, such as cache-2026-11-24.

metadata object

Your own tags for the snapshot, as string keys and values. Accepts any keys.

202 Accepted
{
  "id": "example",
  "valkey_id": "123456789",
  "name": "Example Valkey snapshot",
  "server_id": "123456789",
  "snapshot_type": "manual",
  "status": "pending",
  "size_bytes": 1,
  "availability_zone": "example",
  "failure_reason": "example",
  "lock": {
    "reason": "fraud",
    "details": "example",
    "locked_at": "2026-07-01T12:00:00.000Z"
  },
  "created_at": "2026-07-01T12:00:00.000Z",
  "updated_at": "2026-07-01T12:00:00.000Z",
  "metadata": {
    "example": "value"
  }
}

Returns the Valkey snapshot.

id string

The snapshot's ID, a UUID.

valkey_id string

The ID of the Valkey instance the snapshot was taken from.

name string

The snapshot's name. Defaults to the instance's name and the date, such as cache-2026-11-24.

server_id string or null

The ID of the server that ran the instance's primary. The server isn't in your list of servers. Can become null after the server is deleted.

snapshot_type string

How the snapshot was created.
Valid values:
manual: A request created the snapshot.
scheduled: A snapshot schedule created the snapshot.

status string

The snapshot's state. A new snapshot is ready once it's available.
Valid values:
pending: We're creating the snapshot.
available: The snapshot is ready to restore.
failed: The snapshot couldn't be created. failure_reason says why.
deleting: We're removing the snapshot's data.

size_bytes integer or null

The size of the instance's disk when the snapshot was taken, in bytes. We bill by this size. Is null until the snapshot is ready.

availability_zone string or null

The availability zone the snapshot was taken in. A restore creates the new instance in the same zone.

failure_reason string or null

Why the snapshot couldn't be created, or null unless the snapshot is failed.

lock object or null

Our lock on the snapshot, or null when it isn't locked.

lock.reason string

Why we locked the snapshot. Possible values: fraud, non_payment, abuse, legal, security, maintenance, other.

lock.details string or null

More about the lock, or null when there's nothing more.

lock.locked_at datetime

When we locked the snapshot. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

created_at datetime

When the snapshot was created. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

updated_at datetime

When the snapshot was last updated. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

metadata object

Your own tags, as string keys and values.