Managing variables
You can create environment variables at three hierarchical levels, with check-level variables taking precedence over group and global variables.Check-level variables
Check-level variables
Variables defined at the check level are only available to that specific check. Use these for check-specific configuration or to override group/global variables.Supported by: API, Browser, Multistep & Playwright checksAdd variables on the Variables tab when editing a check.
Example use cases:

- Test-specific credentials
- Different API endpoints per check
- Override default timeout values
Group-level variables
Group-level variables
Variables defined at the group level are inherited by all checks within that group. This is ideal for sharing common configuration across related checks.Benefits:
- Reduces duplication across checks in the same group
- Consistent configuration for related monitoring scenarios
- Easy maintenance when credentials or endpoints change
- Shared service credentials for all checks in a group
- Common API base URLs
- Environment-specific configuration (staging vs production)
Global variables
Global variables
Variables defined at the global level are available to all checks across your entire account. Use these for organization-wide configuration.Best practice: Store variables at the global level whenever possible to follow the DRY (Don’t Repeat Yourself) principle.Example use cases:
- Organization-wide credentials
- Global configuration values
- Default timeout and retry settings
Variable hierarchy
When checks run, Checkly merges variables from all three levels into a single dataset. Variables at more specific levels override those at broader levels: Check variables > Group variables > Global variables This hierarchy allows you to:- Set default values at the global or group level
- Override specific values at the check level when needed
- Maintain flexible configuration with minimal duplication
Accessing variables
Environment variables are accessible in your code using the standard Node.jsprocess.env.VARIABLE_NAME
notation.
Example: GitHub login
Example: GitHub login
variables.spec.ts
Built-in variables
Checkly provides several built-in environment variables that are automatically available in your checks:Runtime variables
Runtime variables
CHECK_NAME
- The name of the current checkCHECK_TYPE
- The type of check (API, BROWSER, etc.)CHECK_ID
- The unique identifier of the checkREGION
- The current data center location (e.g.,us-east-1
)RUN_ID
- Unique identifier for the current check run
Security
- Encryption: All variable data is encrypted at rest and in transit
- Access control: Locked variables can only be accessed by team members with Read & Write access or above
- Best practices: Avoid logging sensitive variables in your check results to prevent exposure to Read Only team members
For more login scenarios and examples, see our login scenarios documentation.