Infisical icon

Infisical

Manage secrets and related resources in Infisical

Actions40

Secret → Update

AI-generated

Summary

Update an existing secret with optional fields such as new name, value, tags, and additional configuration.

Inputs

  • key (required) — The name (key) of the secret to update.
  • projectId (required) — The project to operate on.
  • environment (required) — The environment slug (e.g. dev, staging, prod).
  • folderPath — Path to the folder the operation applies to; defaults to root.
  • additionalFields — Additional fields for the update operation such as new name, comment, secret value, tags, type, etc.
  • requestOptions — Extra HTTP request options (e.g., batch settings, proxy, timeout).

Output shape

a single secret object representing the updated secret

The response includes the updated secret details; optional fields may be present, and errors are signaled via HTTP status codes.

Examples

Example 1: Update the value of a secret named DATABASE_URL in the dev environment of project my-project

key: DATABASE_URL, projectId: my-project-id, environment: dev, folderPath: /, additionalFields: { secretValue: 'newDatabasePassword' }

Example 2: Rename a secret from OLD_NAME to NEW_NAME

key: OLD_NAME, projectId: my-project-id, environment: prod, additionalFields: { newName: 'NEW_NAME' }

Example 3: Attach tag IDs to a secret

key: API_KEY, projectId: proj-xyz, environment: test, additionalFields: { tagIds: 'a1b2c3,d4e5f6' }

Links

Discussion