SecretStore.create(opts)
Create a new secret store.
string
required
Store name (unique per organization)
string[]
Allowed egress hosts (e.g.
["api.anthropic.com"])Promise<SecretStoreInfo>
SecretStore.list(opts?)
List all secret stores.
Returns: Promise<SecretStoreInfo[]>
SecretStore.get(storeId, opts?)
Get a secret store by ID.
string
required
UUID of the secret store
Promise<SecretStoreInfo>
SecretStore.update(storeId, opts)
Partial updates — only the fields you pass are changed.
string
required
UUID of the store to update
string
New store name
string[]
New allowed egress hosts
Promise<SecretStoreInfo>
SecretStore.delete(storeId, opts?)
Deletes the store and all its secrets. Running sandboxes are not affected.
Returns: Promise<void>
SecretStore.setSecret(storeId, name, value, opts?)
Set a secret in a store. Secrets are encrypted at rest. The value is never returned by the API.
string
required
UUID of the secret store
string
required
Secret name (used as the env var name in sandboxes)
string
required
Secret value (encrypted at rest, never returned by API)
string[]
Restrict this secret to specific hosts only
Promise<void>
SecretStore.listSecrets(storeId, opts?)
Returns secret metadata only. Values are never exposed.
Returns: Promise<SecretEntryInfo[]>
SecretStore.deleteSecret(storeId, name, opts?)
Returns: Promise<void>
Using Secrets with Sandboxes
Pass thesecretStore option to Sandbox.create() to inject the store’s secrets:
Using Secrets with Snapshots and Checkpoints
Snapshot template with secrets
Attach a secret store when creating a sandbox from a pre-built snapshot — even if the snapshot was built without one:Checkpoint fork with secrets
Attach or layer a secret store when forking from a checkpoint:Types
SecretStoreInfo
SecretStoreInfo
SecretEntryInfo
SecretEntryInfo