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

Authorizations

Authorization
string
header
required

A member credential in the Authorization: Bearer header: a member session JWT, a portal JWT whose login is linked to a membership in that company, an opaque member token, or a verified One Auth identity access token. The credential alone identifies the member and company. Member session JWTs, and portal JWTs the server minted read-only, are refused with 403 on every write.

Path Parameters

site_id
string<uuid>
required

Public id of one of the member's sites.

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. 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.

status
integer
required

HTTP status code (mirrors the response status line).

data
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.

meta
object
required

Envelope metadata present on every response.