Environment variables

Update an environment variable

Changed on

Updates an environment variable. Uses the "key" field as the ID for updating. Only updates value, locked, and secret properties. Once a value is set to secret, it cannot be unset.

put/v1/variables/{key}

Request

Path parameters

keystring required

The key of the environment variable (this value cannot be changed).

Example:API_KEY

Headers

x-checkly-accountstring uuid

Your Checkly account ID, you can find it at https://app.checklyhq.com/settings/account/general

Request body

keystring

The key of the environment variable (this value cannot be changed).

valuestring required

The value of the environment variable.

lockedboolean

Used only in the UI to hide the value like a password.

secretboolean

Set an environment variable as secret. Once set, its value cannot be unlocked.

Example request

{
  "key": "API_KEY"
}

Response

Successful

keystring required

The key of the environment variable (this value cannot be changed).

valuestring required

The submitted value of the environment variable.

lockedboolean required

Used only in the UI to hide the value like a password.

secretboolean required

Whether the environment variable is stored as a secret.

Example response

{
  "key": "API_KEY"
}

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • breaking

      request body became required

    • breaking

      for the path request parameter key, the minLength was increased from 0 to 1

    • breaking

      for the header request parameter x-checkly-account, the format changed from no format to uuid

    • breaking

      the request property's minLength was increased from 0 to 1

    • breaking

      the request property's minLength was increased from 0 to 1

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • info

      added the non-success response with the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response's property default value false was removed for the status

    • info

      the response's property default value false was removed for the status

    • info

      removed the 401.00 enum value from the response property for the response status

    • info

      removed the 403.00 enum value from the response property for the response status

    • info

      removed the 404.00 enum value from the response property for the response status

    • info

      removed the 429.00 enum value from the response property for the response status

    • info

      removed the Forbidden enum value from the response property for the response status

    • info

      removed the Not Found enum value from the response property for the response status

    • info

      removed the Too Many Requests enum value from the response property for the response status

    • info

      removed the Unauthorized enum value from the response property for the response status