Programmatic access to your data, automations, and reports. Available on the Business plan.
All API requests require a Bearer token in the Authorization header. Create API keys from your dashboard under Settings → API Keys.
curl https://norvius.com/api/v1/sources \ -H "Authorization: Bearer nrv_live_your_api_key_here"
100 requests per minute per API key. Exceeding this limit returns HTTP 429. Rate limit headers are included in every response.
All errors return a JSON body with a consistent structure:
{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid API key."
},
"status": 401
}API keys can be scoped to specific permissions. Each endpoint requires one permission.
read:sourcesread:automationsread:reportsread:accountwrite:automationswrite:webhooksexecute:queryexecute:sqlexecute:trigger/api/v1/sourcesread:sourcesList all connected data sources.
{ "sources": [{ "id", "sourceType", "displayName", "status", "lastSyncAt", "createdAt" }] }/api/v1/sources/:idread:sourcesGet a data source with its detected schema.
{ "source": { ... }, "schema": [{ "columnName", "detectedType", "sampleValues", "confidence" }] }/api/v1/queryexecute:queryRun a natural language query against your connected data.
{ "query": "What were total sales last month?", "sourceId": "optional-uuid" }{ "results": [...], "sql": "SELECT ...", "interpretations": [...] }/api/v1/sqlexecute:sqlExecute a pre-built read-only SQL query directly.
{ "sql": "SELECT ...", "sourceId": "uuid" }{ "results": [...], "sql": "...", "rowCount": 42 }/api/v1/automationsread:automationsList all automations.
{ "automations": [{ "id", "name", "scheduleCron", "status", ... }] }/api/v1/automations/:idread:automationsGet automation details with latest run.
{ "automation": { ... }, "latestRun": { "id", "status", "startedAt", ... } }/api/v1/automationswrite:automationsCreate a new automation from SQL and schedule.
{ "name": "...", "sql": "SELECT ...", "sourceId": "uuid", "scheduleCron": "0 9 * * 1", "timezone": "America/New_York" }{ "automation": { "id", "name", "status": "active", ... } }/api/v1/automations/:idwrite:automationsUpdate schedule or pause/resume an automation.
{ "scheduleCron": "0 8 * * *", "status": "paused" }{ "automation": { ... } }/api/v1/automations/:idwrite:automationsSoft-delete an automation.
{ "ok": true }/api/v1/automations/:id/triggerexecute:triggerManually trigger an automation run.
{ "run": { "id", "status": "pending", "createdAt" } }/api/v1/reportsread:reportsList generated reports.
{ "reports": [{ "id", "automationId", "format", "generatedAt", ... }] }/api/v1/reports/:id/downloadread:reportsGet a signed download URL for a report.
{ "downloadUrl": "https://...", "expiresInSeconds": 300 }/api/v1/webhooksread:automationsList webhook configurations.
{ "webhooks": [{ "id", "automationId", "enabled", ... }] }/api/v1/webhookswrite:webhooksCreate a webhook for an automation.
{ "automationId": "uuid", "url": "https://...", "events": ["run.completed"] }{ "webhook": { "id", "secret", ... } }/api/v1/webhooks/:idwrite:webhooksRemove a webhook.
{ "ok": true }/api/v1/accountread:accountGet tenant information and usage stats.
{ "account": { "name", "tier", ... }, "usage": { "dataSources", "automations", "teamMembers" } }/api/v1/account/usageread:accountGet AI cost and automation run usage for the current period.
{ "period": { ... }, "ai": { "totalInputTokens", "totalCostUsd" }, "automationRuns": 0 }# 1. Create an automation
curl -X POST https://norvius.com/api/v1/automations \
-H "Authorization: Bearer nrv_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Weekly Sales Report",
"sql": "SELECT data->>'\''product'\'' as product, SUM((data->>'\''revenue'\''')::numeric) as total FROM data_rows WHERE source_connection_id = $1 GROUP BY 1 ORDER BY 2 DESC",
"sourceId": "your-source-uuid",
"scheduleCron": "0 9 * * 1",
"timezone": "America/New_York"
}'
# 2. Manually trigger it
curl -X POST https://norvius.com/api/v1/automations/{id}/trigger \
-H "Authorization: Bearer nrv_live_your_key"
# 3. Check the result
curl https://norvius.com/api/v1/automations/{id} \
-H "Authorization: Bearer nrv_live_your_key"