Skip to main content
POST
/
v0
/
query
curl --request POST \
  --url https://api.formo.so/v0/query \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "SELECT toDate(timestamp) as date, uniq(anonymous_id) as dau FROM events WHERE timestamp >= now() - interval 30 day GROUP BY date ORDER BY date"
}
'
{
  "data": [
    {
      "day": "2026-04-21",
      "users": 1284
    },
    {
      "day": "2026-04-22",
      "users": 1352
    },
    {
      "day": "2026-04-23",
      "users": 1411
    }
  ],
  "total": 7,
  "limit": 100,
  "offset": 0,
  "has_more": false
}

Authorizations

Authorization
string
header
required

Workspace API key (e.g. formo_xxx). Create one in the Formo dashboard under Team Settings > API Keys.

Body

application/json
query
string
required

SQL query to execute

Response

Offset-paginated query results. The server doesn't own pagination here; LIMIT and OFFSET come from your SQL string and are echoed back. total is the row count before LIMIT was applied; has_more is true when there are additional rows beyond the current window.

data
object[]
required

Result rows.

total
integer
required

Total rows before LIMIT was applied.

limit
integer
required

Applied LIMIT (parsed from your SQL; defaults to the server cap if absent).

offset
integer
required

Applied OFFSET (parsed from your SQL; 0 if absent).

has_more
boolean
required

True when offset + data.length < total; i.e. there's another page to fetch by re-running with a higher OFFSET.