Skip to content

Update an environment

View .md
PATCH

Rename it, add or replace variables with env, remove them with unset. Variables left out keep their values. Sandboxes already started keep the values they started with.

Authorization

  • Authorizationheaderrequired

    Bearer YOUR_API_KEY. Create a key in the dashboard.

Path parameters

  • environmentIdstringrequired

    Sandbox environment ID.

Body

application/json

  • namestring
    Limitsmax length 64
  • envobject

    Variables to add or replace. A variable left out keeps its value.

    1 properties
    • {key}string
  • unsetstring[]

    Variables to remove.

Responses

200Updated.
  • environmentobjectrequired

    A named set of environment variables to start sandboxes with. Values are encrypted at rest and never returned.

    5 properties
    • idstringrequired
    • namestringrequired
    • variablesobject[]required

      Each variable's name and the last four characters of its value.

      2 properties
      • keystringrequired
      • last4stringrequired
    • createdAtstring<date-time>required
    • updatedAtstring<date-time>required
400Invalid name or variables, or an empty body.
  • codestringrequired
  • messagestringrequired
  • detailsobject
401Unauthorized.
  • codestringrequired
  • messagestringrequired
  • detailsobject
404Environment not found, or it belongs to another project.
  • codestringrequired
  • messagestringrequired
  • detailsobject
409`conflict`: another environment has that name.
  • codestringrequired
  • messagestringrequired
  • detailsobject