Environment variables

Update an environment variable

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}

Path parameters

keystring required

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

Example:API_KEY

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

Headers

x-checkly-accountstring uuid

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

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

Changed in 1 of the 4 revisions of this API.5217

  • 87d29dc7b4fe5217See the full diff
    • request body became required

      request-body-became-required

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

      request-parameter-min-length-increased

    • for the header request parameter x-checkly-account, the type/format was changed from string/ to string/uuid

      request-parameter-type-changed

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

      request-property-min-length-increased

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

      request-property-min-length-increased

    • removed the optional property attributes from the response with the 401 status

      response-optional-property-removed

    • removed the optional property attributes from the response with the 429 status

      response-optional-property-removed

    • added the non-success response with the status 400

      response-non-success-status-added

    • the response property locked became required for the status 200

      response-property-became-required

    • the response property message became required for the status 401

      response-property-became-required

    • the response property message became required for the status 403

      response-property-became-required

    • the response property message became required for the status 404

      response-property-became-required

    • the response property message became required for the status 429

      response-property-became-required

    • the response property secret became required for the status 200

      response-property-became-required

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

      response-property-default-value-removed

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

      response-property-default-value-removed

    • removed the 401.00 enum value from the statusCode response property for the response status 401

      response-property-enum-value-removed

    • removed the 403.00 enum value from the statusCode response property for the response status 403

      response-property-enum-value-removed

    • removed the 404.00 enum value from the statusCode response property for the response status 404

      response-property-enum-value-removed

    • removed the 429.00 enum value from the statusCode response property for the response status 429

      response-property-enum-value-removed

    • removed the Forbidden enum value from the error response property for the response status 403

      response-property-enum-value-removed

    • removed the Not Found enum value from the error response property for the response status 404

      response-property-enum-value-removed

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

      response-property-enum-value-removed

    • removed the Unauthorized enum value from the error response property for the response status 401

      response-property-enum-value-removed

    This revision also has 566 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog