curl --request PUT \
--url https://api.checklyhq.com/v1/variables/{key} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"value": "bAxD7biGCZL6K60Q",
"key": "API_KEY",
"locked": false,
"secret": false
}
'{
"key": "API_KEY",
"value": "<string>",
"locked": false,
"secret": false
}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.
curl --request PUT \
--url https://api.checklyhq.com/v1/variables/{key} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"value": "bAxD7biGCZL6K60Q",
"key": "API_KEY",
"locked": false,
"secret": false
}
'{
"key": "API_KEY",
"value": "<string>",
"locked": false,
"secret": false
}The Checkly Public API uses API keys to authenticate requests. You can get the API Key here. Your API key is like a password: keep it secure!
Authentication to the API is performed using the Bearer auth method in the Authorization header and using the account ID.
For example, set Authorization header while using cURL: curl -H "Authorization: Bearer [apiKey]" "X-Checkly-Account: [accountId]"
Your Checkly account ID, you can find it at https://app.checklyhq.com/settings/account/general
The value of the environment variable.
"bAxD7biGCZL6K60Q"
The key of the environment variable (this value cannot be changed).
"API_KEY"
Used only in the UI to hide the value like a password.
Set an environment variable as secret. Once set, its value cannot be unlocked.
Successful
The key of the environment variable (this value cannot be changed).
"API_KEY"
Used only in the UI to hide the value like a password.
Set an environment variable as secret. Once set, its value cannot be unlocked.
Was this page helpful?