Skip to main content
PUT
Set a company site's environment variable

Authorizations

Authorization
string
header
required

A company admin credential for your company, or a droplet installation token with the website scope for reads, except on the share routes, which refuse a droplet token.

Path Parameters

id
string<uuid>
required

The site's id.

name
string
required

The variable's name: a capital letter, then up to 63 capital letters, digits and underscores, not starting with FLUID_.

Pattern: ^[A-Za-z0-9_]+$

Body

application/json

The value of a variable and whether it is secret, unwrapped. Any other field is refused.

value
string
required

The value, 1 to 5,120 bytes of text.

Minimum string length: 1
secret
boolean
required

Whether the value is secret. Set true for API keys and passwords; the value is then never read back.

Response

The variable was replaced.

One environment variable.

env_var
object
required

One environment variable of a site. The site's server functions receive every variable, secret or not, by name in ctx.secrets. A secret's value is stored encrypted and never read back, so it is null here.

status
integer
required

The HTTP status.

meta
object
required

Response metadata included on every response body.