When to use it
Add assertions whenever a step’s response needs to confirm something specific:- The HTTP status code matches what you expect (
200,201,422). - A response body field has a particular value or shape.
- A header is present or absent.
- A derived value falls within an expected range.
Key concepts
Assertions live at the step level. Each step carries its own set of assertions. A step passes when all its assertions pass; if any assertion fails, the step fails and the journey records the failure. Assertions define acceptance criteria. In Build mode, the journey canvas surfaces acceptance criteria alongside steps. These criteria are what the Coverage view uses to determine whether the journey is proving what it should. Template assertions vs. journey assertions. A request template can include default assertions (e.g., “status is 200”). When you add that template as a step, you inherit those defaults and can extend or override them in the journey. Assertion failures are not crashes. A failed assertion records which condition didn’t hold, what the actual value was, and what was expected. The run continues to capture as much evidence as possible (unless configured to halt on failure). Assertions appear in run output and evidence. After a run, you can see exactly which assertions passed, which failed, and what values they evaluated against — useful for debugging and for runbook evidence collection.How it works
- In Build mode, select a step and open its assertions panel.
- Add assertions by specifying what to check (status code, body field, header) and the expected value or condition.
- When the journey runs, each step’s response is evaluated against its assertions.
- Passed assertions contribute to the run’s success. Failed assertions are recorded with actual vs. expected values.
| Type | Example |
|---|---|
| Status code | status == 201 |
| Body field equals | body.status == "pending" |
| Body field exists | body.order_id is present |
| Header present | response.headers["X-Request-Id"] exists |
| Body contains | body.items has length > 0 |
Examples
A step that creates an order should assert:200 instead of 201, or the body contains "status": "failed", the assertion fails and the run records the discrepancy.

