Guides/How to create a dashboard from CSV data

How to create a dashboard from CSV data

Upload a CSV. Get a dashboard URL.

Updated March 2026

Sutrena is the web runtime for AI agents. Turn any CSV file into a shareable dashboard with three API calls. Upload the file, create the dashboard with a DSL, and share the URL. Pre-aggregated on upload for instant rendering. Perfect for monthly reports, sales data, analytics exports, and any dataset an agent or developer needs to visualize.

1. Get an API key

Use the free plan (sign up at sutrena.com) or get a trial key instantly with no signup.

curl -X POST https://sutrena.com/api/trial

2. Presign the upload

Request a presigned upload URL for your CSV file. Provide the filename and file size in bytes. You get back a csvObjectId to reference when creating the dashboard.

curl -X POST https://sutrena.com/api/dashboards/upload   -H "Authorization: Bearer $KEY"   -H "Content-Type: application/json"   -d '{"filename": "sales-q1-2026.csv", "sizeBytes": 245000}'

# Response:
# {
#   "csvObjectId": "obj_abc123",
#   "uploadUrl": "https://r2.example.com/presigned...",
#   "uploadHeaders": { "Content-Type": "text/csv" }
# }

3. Upload the CSV

PUT the file to the presigned URL. Standard CSV with a header row. UTF-8 encoding. Sutrena auto-detects column types (numbers, dates, booleans, strings) from the first 20 rows.

curl -X PUT "$UPLOAD_URL"   -H "Content-Type: text/csv"   --data-binary @sales-q1-2026.csv

4. Create the dashboard

POST a dashboard definition referencing the csvObjectId. Define widgets with the JSON DSL. Data is pre-aggregated on upload so the dashboard renders instantly. Set isPublic: true to share the URL with anyone.

curl -X POST https://sutrena.com/api/dashboards   -H "Authorization: Bearer $KEY"   -H "Content-Type: application/json"   -d '{
    "title": "Q1 Sales Report",
    "csvObjectId": "obj_abc123",
    "isPublic": true,
    "dsl": {
      "version": 1,
      "widgets": [
        {
          "type": "metric_card",
          "title": "Total Revenue",
          "value": "sum(revenue)"
        },
        {
          "type": "bar_chart",
          "title": "Revenue by Region",
          "groupBy": "region",
          "aggregate": "sum(revenue)"
        },
        {
          "type": "line_chart",
          "title": "Monthly Revenue",
          "groupBy": "$date:month",
          "aggregate": "sum(revenue)"
        },
        {
          "type": "data_table",
          "title": "All Sales",
          "columns": ["rep", "region", "revenue", "date"],
          "limit": 50
        }
      ]
    }
  }'

# Response:
# {
#   "id": "dsh_q1report",
#   "dashboardUrl": "https://sutrena.com/d/dsh_q1report",
#   "dataSource": "csv",
#   "rowCount": 1250,
#   "columnCount": 6
# }

FAQ

What CSV format is supported?

Standard CSV with a header row. UTF-8 encoding (BOM is handled automatically). Sutrena auto-detects column types from the first 20 rows: numbers, ISO dates (2026-01-15 or 2026-01-15T10:30:00Z), booleans (true/false), and strings. Max 50 columns.

How large can the CSV be?

Max file size: 10MB. Max rows: 100,000. Max columns: 50. For most reporting and analytics use cases this is more than enough. Data is pre-aggregated on upload so dashboard rendering is instant regardless of row count.

Can I update the data?

CSV dashboards are static snapshots. To update, upload a new CSV and create a new dashboard. If you need live-updating data, use a form-based dashboard instead. Form dashboards pull from live submissions and auto-refresh every 30 seconds.

What is Sutrena?

Sutrena is the web runtime for AI agents. Three primitives — pages, forms, and dashboards — accessible through one API. Your agent creates web artifacts, humans interact with them, and your agent gets the data back. Framework-agnostic. Works from any MCP client or HTTP client.

Get started in two API calls

1. Get a trial key (no auth, no signup)

curl -X POST https://sutrena.com/api/trial

2. Create a form + dashboard from a template

curl -X POST https://sutrena.com/api/forms \
  -H "Authorization: Bearer st_trial_xxx" \
  -H "Content-Type: application/json" \
  -d '{"templateId": "waitlist", "createDashboard": true}'

Ready to build?

Get a trial API key instantly with no signup, or create an account for the full experience.

Create a dashboard from CSV data — Sutrena | Sutrena