Create secrets for an environment
Adds or updates secrets on the project. Send ?editor=true to replace the whole set: secrets not in the request are deleted.
Values are encrypted at rest. The response echoes the secrets you sent. When you list them later, values come back encrypted; use POST /v1/decrypt to read them.
API key scope: env.write
Team role permission: env.write
Authorizations
API key created in the dashboard under Settings → API keys. Each key carries permission scopes; every endpoint lists the scope it needs.
Path Parameters
ID of the project.
^[a-fA-F0-9]{24}$PREVIEW for secrets used by preview deployments; any other value means production. Use the path without this segment for production.
PRODUCTION, PREVIEW Query Parameters
Replace all secrets with the ones in the request.
true, false Body
Secrets to add. With ?editor=true, the full list that replaces the existing secrets.