SecretStore.create(opts)
Create a new secret store.
Store name (unique per organization)
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.
UUID of the secret store
Promise<SecretStoreInfo>
SecretStore.update(storeId, opts)
Partial updates — only the fields you pass are changed.
UUID of the store to update
New store name
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.
UUID of the secret store
Secret name (used as the env var name in sandboxes)
Secret value (encrypted at rest, never returned by API)
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:
Types
SecretStoreInfo
SecretStoreInfo
| Property | Type | Description |
|---|---|---|
id | string | Store UUID |
orgId | string | Organization UUID |
name | string | Store name |
egressAllowlist | string[] | Allowed egress hosts |
createdAt | string | ISO 8601 timestamp |
updatedAt | string | ISO 8601 timestamp |
SecretEntryInfo
SecretEntryInfo
| Property | Type | Description |
|---|---|---|
id | string | Entry UUID |
storeId | string | Parent store UUID |
name | string | Secret name (env var name) |
allowedHosts | string[] | Host restrictions |
createdAt | string | ISO 8601 timestamp |
updatedAt | string | ISO 8601 timestamp |