Set a variable on a Next site
put/hosting/sites/{id}/env
Set a variable on a Next site. The value is sealed and delivered to the running site only.
Before you call
- Credential
Authorization: Bearer $KEY- Scope
hosting:write- Graphql
Mutation.hostingEnvSet- Sdk
hosting.env.set- Cli
hosting env set
Parameters
- idstring (uuid)requiredIn the path
Request bodyapplication/json, required
- namestringrequiredAt most 64 characters.
- valuestringrequiredAt most 8192 characters.
- scopestringOne of: production, preview, all.
Responses
- 200application/jsonSuccess
- namestringrequired
- scopestringrequiredOne of: production, preview, all.
- 400application/jsonThe request was malformed
- errorstringrequired
- messagestring
- 401application/jsonNo valid credential
- errorstringrequired
- messagestring
- 403application/jsonThe credential lacks the scope, origin or address
- errorstringrequired
- messagestring
- 429application/jsonOver the key's rate limit; see Retry-After
- errorstringrequired
- messagestring