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
| Header | Value |
|---|---|
Authorization | Bearer <token> |
Content-Type | application/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"
} 200Updated config vars
400Bad Request
429Too Many Requests

