SELECT queries are allowed. The response rows are dynamic — fields vary based on your SQL SELECT clause and can include any combination of columns such as time, outcome, count, key_id, and more.
For complete documentation including available tables, columns, data types, and query examples, see the schema reference in the API documentation.
Required permissions:
analytics.*.read_verifications(to query verification analytics)
See the API reference for the full HTTP endpoint documentation.
Usage
Flags
SQL
SELECT query to execute against your analytics data. Only SELECT queries are allowed. The query runs against the key_verifications_v1 table, which contains columns like time, key_id, outcome, and more. See the API reference for the full schema.Global Flags
| Flag | Type | Description |
|---|---|---|
--root-key | string | Override root key ($UNKEY_ROOT_KEY) |
--api-url | string | Override API base URL (default: https://api.unkey.com) |
--config | string | Path to config file (default: ~/.unkey/config.toml) |
--output | string | Output format — use json for raw JSON |
Examples
Output
Default output shows the request ID with latency, followed by the query results:--output=json, the full response envelope is returned:

