Infisical icon

Infisical

Manage secrets and related resources in Infisical

Actions40

Environment → Delete

AI-generated

Summary

Delete an environment from a project

Inputs

  • projectId (required) — The project to operate on, selected from the list or provided by ID.
  • environmentId (required) — The slug or ID of the environment to delete.
  • requestOptions — Collection of advanced request settings such as batching, SSL bypass, proxy, and timeout.
  • allowUnauthorizedCerts — If true, skips SSL certificate validation for the request.
  • proxy — HTTP proxy URL to use for the request, including optional authentication.
  • timeout — Request timeout in milliseconds.

Output shape

a single environment record (the deleted environment)

Returns the deleted environment object; on error may return an error payload.

Examples

Example 1: Delete the environment named "staging" in project "my-project"

Set Project to "my-project" via list or ID, set Environment ID to the target environment slug, then invoke Delete. No additional options needed.

Example 2: Bulk delete multiple environments using batching

Enable Batching in requestOptions, set batchSize and batchInterval as needed, then call Delete for each environment ID.

Example 3: Delete with custom proxy and increased timeout

Configure Proxy, Timeout (e.g., 30000), and AllowUnauthorizedCerts if needed, then execute Delete.

Links

Discussion