Create a secret
Stores a credential under the caller’s team. The plaintext is
envelope-encrypted at rest and is never returned by any API.
At sandbox-create time, bind the secret to an environment-variable
name via the secrets map on POST /sandboxes; the agent sees a
proxy token in env and the in-host enforcement daemon swaps it for
the real value at egress.
Use provider for built-in shortcuts (e.g. anthropic, openai,
github, stripe) which auto-fill the auth scheme and allowed
upstream hosts. Use auth + hosts for a custom integration.
Authorizations
Body
Identifier used to reference the secret later (e.g. in the secrets map on POST /sandboxes).
128^[A-Za-z_][A-Za-z0-9_-]*$Cleartext credential. Encrypted at rest; never returned.
8192Built-in provider shortcut (e.g. anthropic, openai, github, stripe). When set, auto-fills auth scheme and allowed upstream hosts. Mutually exclusive with auth and hosts. github emits a per_host config so the same PAT works for both api.github.com REST (Bearer) and github.com git over HTTPS (Basic with x-access-token).
Egress auth shape. Use the single-rule form (type + type-specific
fields) for credentials that authenticate the same way on every host.
Use per_host when the same credential needs different auth schemes
on different hosts of the same provider — for example one host
accepts Bearer while another accepts Basic with a fixed username.
Single-rule and per_host are mutually exclusive.
- Option 1
- Option 2
Upstream allow list. Required when auth is set. Each entry is a hostname or single-level wildcard (e.g. api.example.com, *.example.com).
16Response
Secret created
per_host indicates a multi-rule secret; the resolved rules are in auth_config.per_host.
bearer, basic, api-key, custom, per_host Resolved auth scheme details (no cleartext value).
Provider shortcut used at creation, if any.
Timestamp of the most recent egress that used this secret.