Set app variables
const url = 'https://qinto-api.blotout.io/developer/organizations/9c1d2b34-5e67-4f89-a0b1-2c3d4e5f6a7b/apps/5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8d/variables';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"values":{"API_BASE":"https://api.example.com"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://qinto-api.blotout.io/developer/organizations/9c1d2b34-5e67-4f89-a0b1-2c3d4e5f6a7b/apps/5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8d/variables \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "values": { "API_BASE": "https://api.example.com" } }'Stores values for the app’s app-scope variables. The body is a partial merge: names it omits keep their current value, and a value cannot be cleared once set.
How it works
The response is the resulting state of every variable, so no follow-up read is needed. A change reaches a running app within about five minutes; an app that needs to read a value back immediately should keep that state in its own storage instead.
Required permissions
- None beyond a valid token; requires an OAuth token with the
developerscope, for an owner or developer of the addressed organization
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Unique id (UUID) of the organization that owns the addressed apps, as listed by GET /me under organizations.
Example
9c1d2b34-5e67-4f89-a0b1-2c3d4e5f6a7bUnique id (UUID) of the organization that owns the addressed apps, as listed by GET /me under organizations.
Unique id (UUID) of the app, as returned by the create and list operations.
Example
5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8dUnique id (UUID) of the app, as returned by the create and list operations.
Request Bodyrequired
Section titled “Request Bodyrequired”The values to store, keyed by variable name.
object
The values to store, keyed by the variable name the manifest declares. Omitted names keep their current value, and there is no way to clear one. Every name must be declared by some version of the app.
object
The value to store, 1-490 bytes.
Example
https://api.example.comExample
{ "API_BASE": "https://api.example.com"}Responses
Section titled “Responses”The app’s app-scope variables after the write.
object
Every app-scope variable any version of the app declares, in the order the earliest version that declares each one lists it. Empty when no version declares any.
One app-scope setting: a value the developer sets once for the app, delivered identically to every site that installs it. Distinct from a site app’s per-install variables, which a site manager fills in.
object
Name the app’s manifest declares the variable under, and the name to send when setting its value.
Where the value is stored: a plain value is readable back, a secret one is write-only and never returned.
How a form should render the input for this variable.
Display label the manifest gives the variable.
Whether a version that declares this variable refuses to publish until it has a value.
One-line guidance the manifest supplies, or null when it supplies none.
Link to the vendor’s own documentation for this value, or null when the manifest supplies none.
The stored value for a plain variable, or null when it has none. Always null for a secret variable.
Whether a value is stored for this variable.
Example
{ "variables": [ { "name": "META_APP_SECRET", "kind": "plain", "type": "text", "label": "Meta app secret", "required": true, "helpText": "Found under App settings in the Meta developer console.", "helpUrl": "https://developers.example.com/app-secret", "value": "https://api.example.com", "set": true } ]}invalid_params — A path parameter failed validation (for example a malformed UUID); details pinpoints the offending parameter. invalid_body — The JSON body is unparseable or failed schema validation; details pinpoints the offending fields when the body could be parsed.
object
Machine-readable error slug; switch on this value rather than on the HTTP status alone.
Field-level validation errors: a tree keyed by input property, each node carrying an errors array of human-readable messages. Render it to help the caller correct the request.
object
Example
{ "error": "invalid_params", "details": { "errors": [], "properties": { "teamId": { "errors": [ "Invalid UUID" ] } } }}unauthenticated — The Authorization: Bearer token is missing, malformed, or no longer valid. Generate a team API token or obtain a new OAuth access token.
object
Machine-readable error slug; switch on this value rather than on the HTTP status alone.
Example
{ "error": "unauthenticated"}forbidden — The bearer credential lacks the required permission or belongs to another team, or its user lacks the organization role a developer operation needs. Update its policies, use a credential bound to the addressed team, or ask an organization owner for the role; message states the reason when one is known.
object
Machine-readable error slug; switch on this value rather than on the HTTP status alone.
Human-readable reason for this specific failure, intended for display — do not parse it programmatically.
Example
{ "error": "forbidden", "message": "The Cloudflare API token is invalid or expired."}not_found — The addressed resource does not exist within this team; check the id and retry.
object
Machine-readable error slug; switch on this value rather than on the HTTP status alone.
Example
{ "error": "not_found"}variable_invalid — The app declares no variable by that name, or another party sets the name (the site manager, the app developer, or the app’s own panel); message names it. variable_too_large — A value exceeds its serialized limit: 256 KB for a large variable, 5 KB for another variable of a single-install app, 490 bytes for one of an app that allows multiple installs or for an app-scope variable; message names the variable, its size and the limit.
object
Machine-readable error slug; switch on this value rather than on the HTTP status alone.
Human-readable reason for this specific failure, intended for display — do not parse it programmatically.
Example
{ "error": "variable_invalid", "message": "The Cloudflare API token is invalid or expired."}internal — Unexpected server error. Nothing is guaranteed to have been persisted; idempotent operations are safe to retry.
object
Machine-readable error slug; switch on this value rather than on the HTTP status alone.
Example
{ "error": "internal"}