Set an environment variable
POST
https://api.shadw.cloud/v1/projects/{project}/envAdd or update an environment variable. Sensitive values are encrypted at rest (ChaCha20-Poly1305). Returns the project's settings, with sensitive values returned empty.
Authentication
AuthorizationbearerTokenA platform API key (hive_…, created under Settings → API Keys) or a JWT of at most 1 hour from POST /v1/token, which is server-only once HIVE_JWT_SECRET is set. An API key scopes the request to the team it was created under.
Path parameters
projectstringRequiredThe project name.
Body parameters
keystringRequiredVariable name.
valuestringRequiredValue (sealed at rest when sensitive).
target"production" | "preview" | "all"OptionalWhich environments it applies to.
scope"runtime" | "build" | "all"OptionalWhere the variable is available: at runtime only, during the build only, or both (default "runtime").
sensitivebooleanOptionalEncrypt at rest and mask in the UI.

