Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

SQL database ID

Body

application/json

The SQL to run, and any positional bind parameters

sql
string
required

The SQL to run. Use positional ? placeholders and supply the values in params rather than interpolating them into this string.

Example:

"SELECT * FROM users WHERE name = ?"

params
(string | number | boolean | null)[]

Positional bind parameters, in placeholder order. Each value is a string, a number, a boolean, or null; booleans are cast to 1/0. The count must match the number of ? placeholders exactly — a mismatch is rejected with 422 rather than binding null for the ones you left out. (Not enforced for multi-statement scripts or named parameters, where the placeholder count is not the number bound.)

Example:

Response

The SQL result

data
object