Skip to main content
DELETE
Delete an environment secret

Authorizations

Authorization
string
header
required

WorkOS access JWT or a user-owned WorkOS API key. User keys are bound to one organization and restricted to their enabled product permissions. Session-only onboarding and session revocation require an interactive access JWT. No cookie session is assumed.

Headers

X-Request-Id
string

Optional caller-provided correlation identifier.

Required string length: 1 - 128
Idempotency-Key
string
required

Identifies one mutation and its canonical request payload.

Required string length: 1 - 128

Path Parameters

project_id
string
required

Project identifier.

Pattern: ^[0-9A-HJKMNP-TV-Z]{26}$
environment_id
string
required

Environment identifier.

Pattern: ^[0-9A-HJKMNP-TV-Z]{26}$
secret_name
string
required

Uppercase environment-variable name. Set refuses a name starting with OHMYHOST_ and the platform names BETTER_AUTH_SECRET, BETTER_AUTH_URL, DATABASE_URL, HYPERDRIVE, ASSETS, FILES, IMAGES and STORAGE with a 400 whose detail is "Secret name is reserved.". Delete refuses the installed platform keys OHMYHOST_AI_KEY, OHMYHOST_MAIL_KEY, OHMYHOST_STORAGE_KEY, OHMYHOST_BROWSER_KEY and BETTER_AUTH_SECRET with the same detail.

Pattern: ^[A-Z][A-Z0-9_]{0,127}$

Response

Idempotent deletion outcome.

name
string
required
Pattern: ^[A-Z][A-Z0-9_]{0,127}$
status
enum<string>
required
Available options:
deleted,
absent
desired_generation
integer
required
Required range: x >= 0
applied_generation
integer
required
Required range: x >= 0
delivery_state
enum<string>
required
Available options:
not_deployed,
pending,
ready,
failed
runtime_provider
enum<string> | null
required
Available options:
wfp,
null
applied_secret_count
integer
required
Required range: 0 <= x <= 100
last_error
string | null
required
Pattern: ^[A-Z][A-Z0-9_]{0,63}$