Skip to content

Credentials API

Beta

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 credential is a login that Steel stores encrypted and fills in on its origin's sign-in pages. Its origin and namespace identify it. These endpoints store, list, update and delete credentials. For the base URL and authentication, see API conventions. For the error codes, see Errors.

The first example is a complete program that stores a login for https://app.example.com, with the password from the SITE_PASSWORD environment variable. The later examples use its client.

Endpoints

Store a credential

POST/v1/credentials

Encrypts and stores the credential of one origin.

Parameters

NameTypeRequiredDescription
originstring · bodyNoThe website origin of the credential, such as https://app.example.com. Set it. Without it, the origin is "default", which matches no page.Default "default".
valueobject · bodyYesThe credential, as string fields: username, password, and totpSecret for one-time passwords.
labelstring · bodyNoA label for the credential.
namespacestring · bodyNoThe namespace of the credential. A session uses the credentials of its own namespace.Default "default".
projectIdstring (uuid) · bodyNoThe project to store the credential in. Required with an organization key.

The response is 201:

Response

FieldTypeDescription
originstringThe website origin of the credential.
namespacestringThe namespace of the credential.
labelstringThe label of the credential.
createdAtstring (date-time)When the credential was created.
updatedAtstring (date-time)When the credential last changed.

See Credentials.

curl -X POST https://api.steel.dev/v1/credentials \
  -H "steel-api-key: $STEEL_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"origin\": \"https://app.example.com\", \"value\": {\"username\": \"user@example.com\", \"password\": \"$SITE_PASSWORD\"}}"

List credentials

GET/v1/credentials

Lists the stored credentials of one namespace. The response holds their metadata, never their values.

Parameters

NameTypeRequiredDescription
projectIdstring (uuid) · queryNoThe project whose credentials to list. Required with an organization key.
namespacestring · queryNoThe namespace whose credentials to list. The response never holds other namespaces.Default "default".
originstring · queryNoThe origin whose credentials to list.

Response

FieldTypeDescription
credentialsobject[]The credentials, each with origin, namespace, label, createdAt and updatedAt.

See Credentials.

curl https://api.steel.dev/v1/credentials \
  -H "steel-api-key: $STEEL_API_KEY"

Update a credential

PUT/v1/credentials

Encrypts and stores new values for the credential of one origin.

Parameters

NameTypeRequiredDescription
originstring · bodyNoThe website origin of the credential.
valueobject · bodyNoThe new credential, as string fields.
labelstring · bodyNoA new label.
namespacestring · bodyNoThe namespace of the credential.Default "default".
projectIdstring (uuid) · bodyNoThe credential's project. Required with an organization key.

The response has the fields in Store a credential.

See Credentials.

curl -X PUT https://api.steel.dev/v1/credentials \
  -H "steel-api-key: $STEEL_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"origin\": \"https://app.example.com\", \"value\": {\"username\": \"user@example.com\", \"password\": \"$SITE_PASSWORD\"}}"

Delete a credential

DELETE/v1/credentials

Deletes the credential of one origin.

Parameters

NameTypeRequiredDescription
originstring · bodyYesThe website origin of the credential.
namespacestring · bodyNoThe namespace of the credential.Default "default".
projectIdstring (uuid) · bodyNoThe project to delete the credential from. Required with an organization key.

Response

FieldTypeDescription
successbooleanWhether the credential was deleted.

See Credentials.

curl -X DELETE https://api.steel.dev/v1/credentials \
  -H "steel-api-key: $STEEL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"origin": "https://app.example.com"}'