Secrets
Named values bound to machines and delivered to their commands as environment variables. For how to use them safely, see Secrets.
Base URL: https://api.sistemo.io · all requests require authentication.
No route returns a value. Values are write-only: they go in once, in the dashboard, and nothing — a response, a list, an error — sends one back.
The secret object
Section titled “The secret object”{ "name": "ORDERS_DB_URL", "custody": "box", "hosts": [], "bound_machines": 2, "created_at": "2026-11-21T09:00:00Z", "updated_at": "2026-11-21T09:00:00Z"}| Field | Notes |
|---|---|
name |
Also the environment variable it becomes |
custody |
box: the value is put into the environment of the machine’s commands, so the machine can read it. proxy: the machine gets a placeholder and the value is swapped in on HTTPS to hosts — see Proxy secrets |
hosts |
Proxy: the only hosts the value is sent to. Box: recorded only |
presentation · method · path_prefix |
Proxy only, present when set — where the credential goes and the optional method / path scope |
bound_machines |
How many live (not destroyed) machines it is bound to |
created_at · updated_at |
RFC 3339 UTC. updated_at moves on rotate |
There is no value field — ever.
List secrets
Section titled “List secrets”GET /v1/secretsScope: read or full.
curl -sS https://api.sistemo.io/v1/secrets \ -H "Authorization: Bearer $SISTEMO_API_KEY"{ "secrets": [ { "name": "ORDERS_DB_URL", "custody": "box", "hosts": [], "bound_machines": 2, "created_at": "2026-11-21T09:00:00Z", "updated_at": "2026-11-21T09:00:00Z" } ]}The whole set, in one response: an account holds at most 50, so this is not a paginated list.
Bind and unbind on a machine
Section titled “Bind and unbind on a machine”POST /v1/machines/{id}/secretsScope: full.
| Field | Type | Notes |
|---|---|---|
bind |
string[] | Names to bind |
unbind |
string[] | Names to unbind |
curl -sS -X POST "https://api.sistemo.io/v1/machines/$MACHINE_ID/secrets" \ -H "Authorization: Bearer $SISTEMO_API_KEY" \ -H "Content-Type: application/json" \ -d '{"bind":["STRIPE_KEY"],"unbind":[]}'Returns 200 with the machine object. Its
secrets field — always present, [] when none — lists the bound names.
The change reaches the machine’s next command; a command already running keeps
the environment it started with. Each bind and unbind is recorded in the
Activity log as secret.bound / secret.unbound (name only).
| Status | Meaning |
|---|---|
400 |
An unknown name, or more than 16 bound to one machine. For a proxy secret also: the machine is not locked, or its allow does not reach every one of the secret’s hosts. detail names it |
403 |
A read key |
404 |
No such machine on your account |
503 |
A proxy secret on a running machine whose egress path could not confirm it can redeem it. Nothing was bound; retry |
You can also bind at create with "secrets": ["NAME", …] — see
Create a machine. An unknown name there is a 400
before anything is created.
A command whose own env sets a name that is also bound to the machine is refused
with a 400, rather than one of the two silently winning.
Create, rotate and delete — dashboard only
Section titled “Create, rotate and delete — dashboard only”POST /v1/secretsPOST /v1/secrets/{name}/rotateDELETE /v1/secrets/{name}These need a dashboard session. Called with an API key, any scope, they answer 403 — so a leaked key can bind an existing secret, but cannot plant a new one or replace a value. Use Secrets in the dashboard sidebar.
| Name | ^[A-Z_][A-Z0-9_]{0,63}$. Reserved: PATH, HOME, USER, SHELL, PWD, LANG, TERM, HOSTNAME, IFS, and any name starting SISTEMO_ or LD_ |
| Value | Up to 8 KiB, no NUL byte. A proxy secret’s value must be at least 8 characters (create and rotate) |
| Proxy fields | custody: "proxy" requires hosts (up to 64) and presentation (bearer, basic, header:<Name>, query:<param>); optional method (capitals, e.g. POST) and path_prefix (starts with /, up to 256 characters) |
| Per account | 50 (409 past it, and for a name that exists) |
| Rotate | Box: bound machines get the new value on their next command. Proxy: running bound machines get it before the call returns; one that cannot be reached is a 503 naming it (the value is stored — rotate again to retry) |
| Delete | 409 while bound to any machine; the message names them |
| Bind / unbind | 409 while the machine is being deleted |
All three are recorded in the Activity log as secret.created, secret.rotated and
secret.deleted, with the name only.
Related
Section titled “Related”- Secrets — what a machine can do with one, and how to limit it
- Network — lock where a machine can send what it holds
- Full reference (OpenAPI)