Skip to main content
POST
Applies vault secrets to many running Linux computers in one call. With remove: true it takes them off instead, and with dry_run: true it changes nothing and says what each computer would get. Each computer gets what Apply secrets to a computer gives it: the same files, the same agent env files, and the same report. Values are never returned.
This call never wakes a computer. A computer that is asleep, in storage or on its host, is listed as not_changed. Start or wake it, then send its id again.

Body parameters

string[]
required
1 to 50 environment variable names from your vault: letters, digits, and underscores, not starting with a digit, up to 64 characters each. Duplicates are ignored. ORGO_API_KEY returns 422.
string[] | null
1 to 100 computers, each a computer UUID or instance_id. Orgo sends to exactly these computers. Duplicates are ignored. null is the same as leaving it out.
string | null
A workspace UUID, in lowercase as Orgo returns it. Without computer_ids, every computer in this workspace is in scope. With computer_ids, it does not choose computers, but it must still be a workspace you can change. Any other string, an id in capitals included, returns 403. null is the same as leaving it out.
boolean
default:"false"
true takes the names off the computers instead of writing them, as described in Remove secrets from a computer.
boolean
default:"false"
true changes nothing. Each computer answers what an apply, or with remove: true a removal, would change there, as described in Preview what would change.
remove and dry_run are each true, false, or left out. Any other value returns 400. Fields this endpoint does not take, such as wake, are ignored.

Which computers

With neither, each name goes where it is saved:
  • An account secret goes to every workspace you own.
  • A secret saved only for a workspace goes to that workspace, whoever owns it.
  • A workspace someone else owns does not get account secrets, because its other members, and the agents they talk to, could read what you send. Name it in workspace_id, or its computers in computer_ids, to include it. Unless every name you send that has an account value also has its own value saved for that workspace, none of those names go there, not even the workspace’s own values. Names saved only for that workspace still go there. When nothing goes there, its running computers are listed as not_changed, with how to include them.
  • With remove: true, an account secret is taken off every workspace you own, except where a workspace has its own secret with that name. Its computers got the workspace’s value, so the name stays there. When that leaves nothing to remove in a workspace, its computers are listed as not_changed.
  • A removal leaves out a workspace someone else owns in the same way, because it takes the name off whatever its value, so it would also take another member’s value of that name. Name the workspace or its computers to include it. A secret saved only for that workspace is still taken off there.
  • A workspace you can only view is never changed. When a secret saved only for that workspace names it, its computers are listed as not_changed, saying you can only view it. Otherwise it is not listed.
  • Client workspaces you created under Invoicing are left out. Name them in workspace_id or computer_ids.
  • A name that is in none of your vaults returns 404 with code: "secret_not_found".
Where a workspace has its own value for a name and Orgo sends that name there, its computers get that value rather than the account’s.

How the call runs

Orgo works on four computers at a time, and never wakes one. A computer whose secrets are too large to send in one call is sent them in halves. No computer starts after 45 seconds, and a computer sent its secrets in halves starts no next half after that. Computers already under way finish, so the answer can take longer than 45 seconds. Orgo starts no step on a computer that could still be running 90 seconds into the call. A removal leaves out its second step on /root/.env when time is short, and that computer’s report says the line stays. The computers that did not start are in remaining, and next holds the calls that finish the job.

Response

boolean
Whether this was a preview.
string[]
The names sent, without duplicates.
object[]
One entry per computer, in the order of the computers in scope, followed by the computers found not_changed while choosing them.
string[]
The computers that did not start before the time ran out: the ids as you sent them in computer_ids, or computer UUIDs otherwise. Empty when every computer ran.
object[]
The calls that finish the job: the computers in remaining, each call with the names those computers were due. Send each one to this endpoint as it is. Empty when remaining is.
The answer carries Cache-Control: no-store.

Outcomes

Common reasons:

Continue with remaining

When remaining is not empty, send each body in next to this endpoint as it is, and do the same with each answer until next is empty. Running the same apply on a computer twice is safe: the values are merged, not added twice. Each body in next names the computers in computer_ids, up to 100 a call, which is the most computer_ids takes. Its names are what those computers were due. With the default scope that can be fewer than you sent: a workspace with its own value for a name keeps it on a removal, and a secret saved for one workspace goes to that workspace only. Sending every name to those computers instead fails where a name is not in your vault for the computer’s workspace, and a removal would take off a name the workspace keeps its own value for.

Errors

A refusal for one computer never fails the call. It is that computer’s failed or not_changed result.

Example

The cURL call previews what applying ANTHROPIC_API_KEY would change on every computer in a workspace. The Python one applies it, then sends each body in next until every computer has run. Set $WORKSPACE_ID to the workspace’s id.

Response

Authorizations

Authorization
string
header
required

API key authentication. Get your key at orgo.ai/workspaces

Body

application/json
names
string[]
required

The vault names to apply, remove, or preview. Duplicates are ignored. ORGO_API_KEY answers 422.

Required array length: 1 - 50 elements

An environment variable name: letters, digits, and underscores, not starting with a digit, up to 64 characters.

Pattern: ^[A-Za-z_][A-Za-z0-9_]{0,63}$
computer_ids
string[] | null

Exactly these computers. Duplicates are ignored. null is the same as leaving it out.

Required array length: 1 - 100 elements

A computer UUID or instance_id.

Pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
workspace_id
string<uuid> | null

Without computer_ids: every computer in this workspace. With computer_ids it does not choose computers, but it must still be a workspace you can change. A string that is not the id of a workspace you are a member of, a UUID in capitals included, answers 403. null is the same as leaving it out.

remove
boolean
default:false

true takes the names off the computers instead of writing them.

dry_run
boolean
default:false

true changes nothing. Each computer answers what an apply, or with remove: true a removal, would change there.

Response

Each computer's outcome. The answer carries Cache-Control: no-store.

dry_run
boolean
required
names
string[]
required

The names sent, without duplicates.

results
object[]
required

One entry per computer, in the order of the computers in scope, followed by the computers found not_changed while choosing them.

remaining
string[]
required

The computers that did not start before the time ran out: the ids as sent in computer_ids, or computer UUIDs otherwise. next holds the calls that finish them.

next
object[]
required

The calls that finish the job: the computers in remaining, grouped by the names each was due, up to 100 a call. Send each one to this endpoint as it is. With neither computer_ids nor workspace_id, a workspace can be due fewer names than were sent. Empty when remaining is.