---
title: "Dry Run Custom Query"
method: POST
path: "/core/custom-data/tables/{name}/queries/dry-run"
tags: ["custom_data"]
---

# Dry Run Custom Query

`POST /core/custom-data/tables/{name}/queries/dry-run`

## Request

- Base URL: `https://api.anyreach.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.anyreach.ai/core/custom-data/tables/{name}/queries/dry-run`
- Auth: HTTP bearer

Run unsaved SQL against live rows, for the authoring surface.

The only endpoint that takes SQL as a parameter, which is exactly why it is
behind the authoring scope and separate from the agent path.

## Path parameters

- `name` string, required

## Headers

- `x-anyreach-org` string, nullable: Organization ID for user PATs (pat_ prefix tokens)

## Request body

- SavedQueryDryRunRequest: Sample argument values, so the author can see real rows before saving.
  - `sql` string, required
  - `params` QueryParamSpec[]
    - `name` string, required
    - `type` 'string' | 'number' | 'integer' | 'boolean' | 'date' | 'date-time' | 'embedding'
  - `row_limit` integer
  - `args` object

## Response `200`

Successful Response

- DryRunResponse
  - `ok` boolean, required
  - `records` object[]
  - `count` integer
  - `referenced_columns` string[], nullable
  - `reason` string, nullable

## Other responses

- `404`: Not found
- `422`: Validation Error

---

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