Update storefront config vars

Updates storefront environment variables and triggers a new deployment.

Updates the environment configuration variables for the storefront application. After a successful update, a new deployment is automatically triggered so the new values take effect.

Requires the storefront:configvars:write or storefront.write permission.

Request

PUT /storefront/config-vars

Headers

HeaderValue
AuthorizationBearer <token>
Content-Typeapplication/x-www-form-urlencoded

Request Body

Pass the config vars as key-value pairs. Only include the vars you want to change; existing vars not present in the request are unchanged.

Example Request

PUT /storefront/config-vars
Content-Type: application/x-www-form-urlencoded

NEXT_PUBLIC_MAKAIRA_URL=https://myshop-production.makaira.io&NEXT_PUBLIC_SHOP_DOMAIN=www.myshop.com

Response

Returns the updated config vars on success. Returns 400 Bad Request with an error message if the update is invalid. Returns 429 Too Many Requests if a deployment could not be triggered because one is already in progress.

Example Response

{
  "NEXT_PUBLIC_MAKAIRA_URL": "https://myshop-production.makaira.io",
  "NEXT_PUBLIC_SHOP_DOMAIN": "www.myshop.com"
}
Form Data
Responses
200

Updated config vars

400

Bad Request

429

Too Many Requests

Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here!