> ## Documentation Index
> Fetch the complete documentation index at: https://checkly-422f444a-mda-troubleshooting-section.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Multistep Checks Overview

> Monitor complex API workflows with sequential requests using Playwright API testing mode for comprehensive end-to-end validation.

<Tip>
  **Monitoring as Code**: Learn more about the [Multistep Check Construct](/constructs/multistep-check).
</Tip>

## What are Multistep Checks?

Multistep checks are API-focused tests that perform multiple sequential HTTP requests within a single check. They're designed to test complete user workflows that span multiple API endpoints, ensuring that complex business processes work correctly from start to finish.

**Multistep checks are perfect for:**

* User authentication and authorization flows
* E-commerce checkout and payment processes
* Data processing and workflow pipelines
* Multi-step form submissions
* Complex business transaction testing
* API dependency chain validation

## How Multistep Checks Work

Multistep checks execute a series of API requests in sequence, with the ability to pass data between steps:

1. **Step Execution** - Runs each API request in defined order
2. **Data Flow** - Passes response data from one step to the next
3. **State Validation** - Verifies system state at each step
4. **Error Handling** - Manages failures and rollback scenarios
5. **Performance Tracking** - Measures timing across the entire workflow
6. **Result Aggregation** - Combines results from all steps

<Tip>
  Multistep checks are powered by Playwright's API testing mode, providing excellent debugging capabilities and detailed request/response logging.
</Tip>

## Key Capabilities

<Accordion title="Sequential API Request Execution">
  Execute multiple API calls in a predefined order, ensuring each step completes successfully before proceeding to the next.
</Accordion>

<Accordion title="Data Passing Between Requests">
  Extract data from API responses and use it in subsequent requests, enabling realistic workflow testing with dynamic values.
</Accordion>

<Accordion title="Complex Authentication Flows">
  Handle multi-step authentication processes like OAuth flows, token refresh sequences, and session-based authentication chains.
</Accordion>

<Accordion title="Workflow State Validation">
  Verify that each step in your business process maintains proper state and data consistency throughout the entire workflow.
</Accordion>

<Accordion title="Performance Measurement Across Steps">
  Monitor response times and performance metrics for individual steps and the complete workflow to identify bottlenecks.
</Accordion>

## Timeouts

As with Browser checks, Checkly runs Multistep checks for a maximum of 240s. Scripts exceeding this will timeout. For more information on how to work with the timeout limits for Multistep and Browser checks, see [Timeouts](/detect/synthetic-monitoring/browser-checks/timeouts).

## Built-in Runtime Variables

The Multistep Check [runtime](/platform/runtimes/overview) exposes a set of environment variables (e.g. `process.env.CHECK_NAME`) that indicate what check, check type etc. you are running.

| Variable          | Description                                 | Availability                                                |
| ----------------- | ------------------------------------------- | ----------------------------------------------------------- |
| `ACCOUNT_ID`      | The ID of the account the check belongs to. |                                                             |
| `CHECK_ID`        | The UUID of the check being executed.       | Only available after saving the check.                      |
| `CHECK_NAME`      | The name of the check being executed.       |                                                             |
| `CHECK_RESULT_ID` | The UUID where the result will be saved.    | Only available on scheduled runs.                           |
| `CHECK_RUN_ID`    | The UUID of the check run execution.        | Only available on scheduled runs.                           |
| `CHECK_TYPE`      | The type of the check, e.g. `BROWSER`.      |                                                             |
| `PUBLIC_IP_V4`    | The IPv4 of the check run execution.        |                                                             |
| `PUBLIC_IP_V6`    | The IPv6 of the check run execution.        |                                                             |
| `REGION`          | The current region, e.g. `us-west-1`.       |                                                             |
| `RUNTIME_VERSION` | The version of the runtime, e.g, `2023.09`. | Only in Browser, Multistep, and API setup/teardown scripts. |

[Learn more about environment variables.](/platform/variables)
