Skip to main content
POST
Checkpoint a Sailbox

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string

Makes the request retry-safe. Sail remembers the answer it sent under a key, including a 400 or a 409, and replays it with Idempotent-Replayed: true for a retry that repeats the key, the method, the path, and the body. Bodies are compared byte for byte. Reusing a key for a different request returns 409, so send a corrected request under a new key. A key that is blank or only spaces is ignored, and the request runs without idempotency.

Any string of up to 255 bytes works, and characters outside ASCII count for more than one. A UUID is a good default. Keys are remembered for at least 24 hours and scoped to the API key that sent them.

A server error, or a failure to record the answer, can leave a key unsettled, and creating a Sailbox is where that matters. See Retrying safely.

Maximum string length: 255

Path Parameters

sailbox_id
string
required

Id of the Sailbox, as returned by create. It is sb_ followed by a UUID.

Pattern: ^sb_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

Body

application/json
name
string

Name for the checkpoint.

ttl_seconds
integer<int64>

How long the checkpoint stays usable, in seconds. Omit it, or send 0, for seven days. Once it expires you can no longer start a Sailbox from it, so set a longer value for anything you want to keep.

Required range: 0 <= x <= 4294967295
Example:

604800

Response

The operation was accepted.

sailbox_id
string
required

Sailbox the checkpoint was taken from.

status
string
required

Current state of the Sailbox the checkpoint was taken from. Values in use today are creating, running, paused, sleeping, terminating, terminated, failed, create_failed, interrupted_restorable, and interrupted_unsafe_to_retry. New values can appear over time, so treat this as an open set.

checkpoint_generation
integer<int64>
required

The Sailbox's checkpoint counter after this checkpoint. It goes up by one every time the Sailbox saves its state, which includes pausing and sleeping.

checkpoint_id
string

Id to pass when starting a Sailbox from this checkpoint.

expires_at
string<date-time>

When the checkpoint expires, seven days out unless you asked for a different ttl_seconds. Starting a Sailbox from it after that fails.