Skip to content
POST /dashboard/{id}/widget/{key}/export

Needs view access and table_controls.can_export. Limited to 10 per minute per user (429 export_rate_limited). Streams CSV or NDJSON with Content-Disposition and Cache-Control no-store. Session callers only (403 export_requires_session for a token). Errors before streaming: 403 export_not_allowed, 400 viewer_control_invalid, 400 filter_invalid, 503 export_unavailable (limiter unbound). A failure mid-stream aborts the connection and an NDJSON export ends with an {"_error":...} line.

Path Parameters

idstring
required·

Resource id

keystring
required·

Widget key

Request Body

filtersobject
formatstring
Possible values:
csvndjson
vcobject
curl -X POST 'https://api.elaichi.ai/dashboard/<id>/widget/<key>/export' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"format":"csv","vc":{},"filters":{}}'
const body = {
  "format": "csv",
  "vc": {},
  "filters": {}
};

const response = await fetch('https://api.elaichi.ai/dashboard/<id>/widget/<key>/export', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
import os
import requests

url = "https://api.elaichi.ai/dashboard/<id>/widget/<key>/export"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}
payload = {
    "format": "csv",
    "vc": {},
    "filters": {}
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())