---
title: "Dry-run one case, saved or ad-hoc"
method: POST
path: "/voice/agents/{agent_id}/test"
tags: ["Voice"]
---

# Dry-run one case, saved or ad-hoc

`POST /voice/agents/{agent_id}/test`

## Request

- Base URL: `https://be.graph8.com/api/v1`
- URL: `https://be.graph8.com/api/v1/voice/agents/{agent_id}/test`
- Auth: HTTP bearer

SPENDS NOTHING. One dry run, from a saved case (`test_case_id`) or an
ad-hoc input (`input_message`), never both.

Returns the run row with the composed preview: the instruction stack the
agent would receive, the tools it could reach for and the grounding it
could cite, judged against the assertion. No model call, no call placed,
no message sent. `triggered_by` defaults to the key's identity.

## Path parameters

- `agent_id` string, required: Voice agent id.

## Headers

- `Authorization` string, nullable
- `X-Target-Org-Id` string, nullable

## Request body

- AgentTestRun: One dry run. Exactly one source: `test_case_id` (a saved case) or `input_message` (ad-hoc). Never calls a model, never places a call, never sends a message - it resolves what the agent WOULD receive and reach for.
  - `mode` 'preview' | 'dry_run', nullable: preview | dry_run - both resolve configuration only.
  - `test_case_id` string, nullable
  - `input_message` string, nullable
  - `input_context` object, nullable
  - `channel` 'chat' | 'inbound' | 'outbound', nullable
  - `expected_output` unknown
  - `assertion_type` 'exact' | 'contains' | 'not_contains' | 'expects_tool' | 'refuses' | 'cites_collection' | 'llm_judge', nullable
  - `assertion_config` object, nullable
  - `triggered_by` string, nullable

## Response `200`

Successful Response

- ApiResponseVoicePayload
  - `data` VoicePayload, required: One voice object - a collection, an agent, a route, a chat. Open-shaped: voice adds fields to these bodies on its own release cadence and a dropped-or-added key must not be a 500 in this service.
  - `pagination` PaginationMeta
    - `page` integer, required: Current page number (1-indexed)
    - `limit` integer, required: Items per page
    - `total` integer, required: Total number of items
    - `has_next` boolean, required: Whether there are more pages
    - `next_cursor` string, nullable: Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers.
    - `total_available` integer, nullable: Search endpoints only: how many records really match, when known. Can be larger than `total`, which is capped at the 10,000 results that can be paged. For company search this is a distinct-company estimate. Null when unknown; absent outside search.
    - `total_is_lower_bound` boolean, nullable: Search endpoints only: true when more records match than `total` shows (the result set is larger than the 10,000 results that can be paged). Absent outside search.
    - `notes` string[], nullable: Search endpoints only: plain-language notes about the result, e.g. that more records match than can be paged, or that a reversed `between` range was put in order.

## Other responses

- `422`: Validation Error

---

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