---
title: "Record an objective check"
method: POST
path: "/test/journeys/{id}/versions/{version}/objectiveCheck"
tags: ["Test"]
---

# Record an objective check

`POST /test/journeys/{id}/versions/{version}/objectiveCheck`

## Request

- Base URL: `https://api.mabl.com`
- URL: `https://api.mabl.com/test/journeys/{id}/versions/{version}/objectiveCheck`
- Auth: one of:
  - HTTP basic
  - API key in header `Authorization`

Records whether the steps of one test version satisfy its objective summary, as a new check that becomes the version's current verdict. The test version itself is not changed. Who checked it comes from the caller's credentials. An agent may only record aligned or drifted, and only when the current check is missing or was recorded by an agent. accepted_gap is for people only and needs a gap. Re-sending the current verdict records nothing and returns the current check.

## Path parameters

- `id` string, required
- `version` integer, required

## Request body

- TestObjectiveCheckRequest: A verdict on whether a test version's steps satisfy its objective summary.
  - `state` 'aligned' | 'drifted' | 'accepted_gap', required: aligned means the steps satisfy the summary; drifted means they fall short, with the difference in gap; accepted_gap means a person saw that gap and chose to keep it.
  - `gap` string: How the steps fall short of the summary. Required for accepted_gap, optional for drifted, and dropped for aligned.

## Response `200`

The request matched the current check, so nothing was recorded

- TestObjectiveCheck: One verdict on whether the steps of a test version satisfy that version's objective summary. Stored apart from the test, so recording one never creates a test version, and never carried to a new version. Scoped to the step list stored on that version. Steps reached through a referenced flow are not covered: a flow is held by ID and resolved to a version at run time, and that resolution depends on the branch, so editing a referenced flow, or reading the test from a branch that resolves it differently, can leave the check describing steps it never saw.
  - `id` string
  - `workspace_id` string
  - `test_invariant_id` string: The test invariant ID
  - `test_version` integer
  - `state` 'aligned' | 'drifted' | 'accepted_gap': aligned means the steps satisfy the summary; drifted means they fall short, with the difference in gap; accepted_gap means a person saw that gap and chose to keep it.
  - `gap` string: When state is drifted or accepted_gap, how the steps fall short of the summary.
  - `checked_time` integer: When the check was recorded, in epoch milliseconds.
  - `checked_by_type` 'user' | 'agent': Who authored the objective summary.
  - `checked_by_id` string: The ID of the user or API key that recorded the check.
  - `checked_by_agent_session_id` string: The agent session that recorded the check, when an agent did.

## Other responses

- `201`: The check was recorded and is now the version's current verdict
- `400`: Invalid or missing parameter
- `401`: User not authenticated
- `403`: User not authorized
- `404`: Entity not found
- `409`: Conflicts with the current state of the resource
- `default`: Unknown error

## Changes

- **2026-10-19** `b602223aa51f`: 6 info
  - added the optional property `guardrail/allOf[#/components/schemas/GuardrailRefusal]/approval` to the response with the `400` status
  - added the optional property `guardrail/allOf[#/components/schemas/GuardrailRefusal]/approval` to the response with the `401` status
  - added the optional property `guardrail/allOf[#/components/schemas/GuardrailRefusal]/approval` to the response with the `403` status
  - added the optional property `guardrail/allOf[#/components/schemas/GuardrailRefusal]/approval` to the response with the `404` status
  - …2 more
- **2026-10-17** `91ff383fb7f9`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/mabl/apis/mabl-api/changes/test/journeys/:id/versions/:version/objectiveCheck/post.md)

---

[API](https://skmtc.dev/mabl/apis/mabl-api.md) · [All operations](https://skmtc.dev/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mabl/apis/mabl-api/revisions/b602223aa51f?raw)
