Skip to content

Vaults API

View as Markdown

Set up your agent

Give your coding agent a Steel browser and the Steel skills, so that it browses and writes Steel code the right way. Learn more

Install the Steel CLI. It signs you in and installs the skills for your coding agents.

curl -fsS https://setup.steel.dev | sh

Or send this prompt to your coding agent, and it does the same:

Read https://setup.steel.dev/install.md and follow it to set up Steel for this coding client.
Then continue my requested task using the installed Steel skill.

Set up your agent →

A Vault is a named group of credentials in a project. These endpoints create, list, get, update and delete Vaults. For the base URL and authentication, see API conventions. For Vault names, items and bindings, see Vaults.

The first example is a complete program. The later examples use its client, and the ID of a Vault in VAULT_ID (cURL), vaultId (TypeScript), vault_id (Python and Rust) or vaultID (Go).

Endpoints

List Vaults

GET/v1/vaults

Lists the Vaults in a project.

Parameters

NameTypeRequiredDescription
projectIdstring (uuid) · queryNoThe project whose Vaults to list.

Response

FieldTypeDescription
vaultsobject[]The Vaults, each with the fields in Create a Vault.
list-vaults.mts
import Steel from "steel-sdk";

const client = new Steel();
const result = await client.vaults.list();

for (const vault of result.vaults) {
  console.log(vault.id, vault.name);
}

Create a Vault

POST/v1/vaults

Creates a Vault.

Parameters

NameTypeRequiredDescription
namestring · bodyYesThe Vault name. It has 1 to 63 lowercase letters, digits, dots, underscores or hyphens, and starts with a letter or digit.
descriptionstring or null · bodyNoA description of the Vault.
projectIdstring (uuid) · bodyNoThe project to create the Vault in.

The response is 201 with the Vault:

Response

FieldTypeDescription
idstring (uuid)The Vault ID.
namestringThe Vault name.
descriptionstring or nullThe Vault description.
projectIdstring (uuid)The project that owns the Vault.
createdAtstring (date-time)When the Vault was created.
updatedAtstring (date-time)When the Vault last changed.
const vault = await client.vaults.create({
  name: "acme-prod",
  description: "Logins for the Acme account",
});
console.log(vault.id, vault.name);

Get a Vault

GET/v1/vaults/{id}

Returns one Vault.

Parameters

NameTypeRequiredDescription
idstring (uuid) · pathYesThe Vault ID.
projectIdstring (uuid) · queryNoThe Vault's project.

The response is the Vault object, with the fields in Create a Vault.

const vault = await client.vaults.retrieve(vaultId);
console.log(vault.name);

Update a Vault

PATCH/v1/vaults/{id}

Changes a Vault's name or description.

Parameters

NameTypeRequiredDescription
idstring (uuid) · pathYesThe Vault ID.
projectIdstring (uuid) · queryNoThe Vault's project.

The response is the Vault object, with the fields in Create a Vault.

const vault = await client.vaults.update(vaultId, {
  name: "acme-production",
});
console.log(vault.updatedAt);

Delete a Vault

DELETE/v1/vaults/{id}

Deletes an empty Vault. Delete or move its items first; a Vault that has items returns 409.

Parameters

NameTypeRequiredDescription
idstring (uuid) · pathYesThe Vault ID.
projectIdstring (uuid) · queryNoThe Vault's project.

The response is 204 with no body.

See Vaults.

await client.vaults.delete(vaultId);
Was this page helpful?