---
title: "[Beta] Execute a batch of SQL statements against an axon's database."
method: POST
path: "/v1/axons/{id}/sql/batch"
tags: ["axons"]
---

# [Beta] Execute a batch of SQL statements against an axon's database.

`POST /v1/axons/{id}/sql/batch`

[Beta] Execute multiple SQL statements atomically within a single transaction against an axon's SQLite database.

## Path parameters

- `id` string, required

## Request body

- SqlBatchParams
  - `statements` SqlStatementParams[], required — The SQL statements to execute atomically within a transaction.
    - `sql` string, required — SQL query with ?-style positional placeholders.
    - `params` object[] — Positional parameter bindings for ? placeholders.

## Response `200`

OK

- SqlBatchResultView
  - `results` SqlStepResultView[], required — One result per statement, in order.
    - `success` SqlQueryResultView
      - `columns` SqlColumnMetaView[], required — Column metadata.
        - `name` string, required — Column name or alias.
        - `type` string, required — Declared type (TEXT, INTEGER, REAL, BLOB, or empty).
      - `rows` object[], required — Result rows (empty for non-SELECT statements).
      - `meta` SqlResultMetaView, required
        - `duration_ms` number, double, required — Execution time in milliseconds.
        - `changes` integer, required — Rows modified by INSERT/UPDATE/DELETE.
        - `rows_read_limit_reached` boolean, required — True when result was truncated at the row limit.
    - `error` SqlStepErrorView
      - `message` string, required — Error message.

---

[API](https://skmtc.net/runloopai/apis/runloop-api.md) · [All operations](https://skmtc.net/runloopai/apis/runloop-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/runloopai/runloop-api/versions/ef553a04de89/schema)
