Create a Sailbox
Creates a Sailbox and waits for startup to finish, which can take a few minutes. image has to describe an image that is ready to boot: a base image on its own, or one already built from that same spec through an SDK or the CLI.
Send an Idempotency-Key so a network retry replays this answer instead of starting a second Sailbox. A server error can still arrive once the Sailbox exists, so read Retrying safely before you retry one.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
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.
255Body
Human-readable name for the new Sailbox. Names are not unique, so keep hold of the returned sailbox_id. It is stored as you send it, surrounding spaces included, so trim it yourself if you compare names later. Control characters are not allowed.
1 - 128\SId of the app that will own the Sailbox. Use POST /apps/find to look one up by name.
1\SDescribes the environment the Sailbox boots into. A base image on its own is ready to boot. Adding build steps, environment variables, or a Python version describes an image that has to be built before a Sailbox can start from it, and building one takes an SDK or the CLI.
Machine size. s is 1 vCPU, m is 4 vCPUs, l is 8 vCPUs.
s, m, l, Memory limit in GiB. Allowed ranges are 2 to 64 for size s, 8 to 128 for m, and 16 to 256 for l. Omit it to take the default for the size: 16 for s, 32 for m, and 64 for l.
Disk limit in GiB. Allowed ranges are 8 to 128 for size s, 32 to 512 for m, and 64 to 1024 for l. Omit it to take the default for the size: 32 for s, 128 for m, and 256 for l.
Ports to publish. You can also publish ports later without restarting.
Volumes to mount into the Sailbox.
org lets anyone in your organization operate the Sailbox. private restricts that to the user whose key created it, so it needs a user-scoped key. An organization admin can still pause, resume, sleep, schedule a wake, upgrade, or terminate it by sending X-Sail-Owner-Override-Reason.
org, private, Response
Check status: running means the Sailbox is ready, and failed means it did not start, with error_message saying why.
Id of the new Sailbox.
Current state of the Sailbox. 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.
Why the Sailbox failed to start, when it did.