Documentation menu

Get secrets

GEThttps://api.instacloud.com/projects/{projectId}/secrets

Token scope: account · org · project — read-only tokens allowed.

The secret seam — decrypt and return the branch's credential bundle, or one compute service's slice of it with ?service=<type>/<name>. Both carry the branch's canonical provider credentials (the .env contract, #323); NEITHER reports what a container receives, which needs an explicit binding. A name several services define is listed in collisions, and omitted from the bundle when ?on_collision=withhold. Gated — secrets.read.

Parameters

NameInTypeRequiredDescription
branchquerystringnoBranch name (defaults to the project's default branch)
servicequerystringnoAnswer with ONE compute service's slice of this seam, as "<type>/<name>": that service's user secrets, the unbound ones, its explicit provider bindings, and the branch's canonical provider credentials. This is the .env seam NARROWED BY SERVICE, not a container inspection — a container receives a provider credential only where bound, so this read is deliberately wider than the deployed env. Compute only; a managed service is a 400 naming /services/:serviceId/credentials.
on_collisionquery"merge" | "withhold"noHow to answer a name several services define. "merge" (the default, and today's behaviour) returns whichever row is newest; "withhold" omits it. Either way the name is listed in `collisions`.
projectIdpathstringyes

Responses

200

Default Response

FieldTypeRequiredDescription
secretsobjectnoenv-var name → decrypted value (e.g. DATABASE_URL, AWS_ACCESS_KEY_ID, ...)
collisionsobject[]no
collisions.namestringyesenv-var name more than one service defines, so a flat bundle cannot attribute a value to it
collisions.servicesstring[]yes"<type>/<name>" of every service that defines it; a since-removed holder appears as its service id

202

Default Response

FieldTypeRequiredDescription
status"approval_required"no
approvalIdstringno
actionstringnothe gated action, or a comma-joined compound set — prefer `actions`
actionsstring[]noevery capability this approval covers
messagestringno
urlstringnothe console page where a project admin reviews this request
nextActionsobject[]no
nextActions.opstringyesNeutral logical action id, e.g. "service.add" — NOT an operationId or a CLI/MCP tool name; each client maps it to its own surface.
nextActions.reasonstringyesNatural-language, human/LLM-facing "why do this now".
nextActions.argsobjectnoSuggested, flat named arguments; "<placeholder>"s where a value is unknown.
nextActions.gatedbooleannoTrue if the action passes a governance gate.

400

Default Response

FieldTypeRequiredDescription
errorstringyes

404

Default Response

FieldTypeRequiredDescription
errorstringyes

View as Markdown