Actions38
- Environment Actions
- Folder Actions
- Project Actions
- Secret Actions
- Secret Import Actions
- Secret Tag Actions
Secret → Create
AI-generatedSummary
Create a new secret within a specified Infisical project environment and folder path, specifying its key, value, and optional metadata, comment, encoding, and type.
Inputs
- Project ID (required) — The ID of the Infisical project where the secret will be created.
- Environment (required) — The environment slug (e.g., dev, staging, prod) to contain the secret.
- Secret Path — The folder path inside the environment to place the secret (default is /).
- Secret Key (required) — The name of the secret to create.
- Secret Value (required) — The value of the secret.
- Additional Fields — Optional parameters including a comment for the secret, whether to skip multiline encoding, and whether the secret is shared or personal.
- Secret Metadata — Optional multiple key/value metadata tags to attach to the secret.
Output shape
a single JSON object representing the created secret
The operation returns the response from the Infisical API confirming the created secret with all details, suitable for use or verification in subsequent workflow steps.
Examples
Example 1: Create a shared secret named 'API_KEY' with a secret value in the 'dev' environment under the root folder of a project with ID 'proj-1234'.
Set 'Project ID' to 'proj-1234', 'Environment' to 'dev', 'Secret Path' to '/', 'Secret Key' to 'API_KEY', and enter the secret string in 'Secret Value'. Optionally, add metadata tags or comments in Additional Fields.
