curl --request GET \
--url https://go.aiinsurance.io/api/v1/companies/{companyId}/entities/{entityType}/export-runs/{runId}/download \
--header 'Authorization: Bearer <token>'import requests
url = "https://go.aiinsurance.io/api/v1/companies/{companyId}/entities/{entityType}/export-runs/{runId}/download"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://go.aiinsurance.io/api/v1/companies/{companyId}/entities/{entityType}/export-runs/{runId}/download', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://go.aiinsurance.io/api/v1/companies/{companyId}/entities/{entityType}/export-runs/{runId}/download",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://go.aiinsurance.io/api/v1/companies/{companyId}/entities/{entityType}/export-runs/{runId}/download"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://go.aiinsurance.io/api/v1/companies/{companyId}/entities/{entityType}/export-runs/{runId}/download")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://go.aiinsurance.io/api/v1/companies/{companyId}/entities/{entityType}/export-runs/{runId}/download")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyExposure Name,Exposure Type
Acme Corp HQ,company
Beta Warehouse,companyDownload Entity Export Run
Downloads the file a succeeded export run produced — the file half of
POST /entities/{entityType}/export-runs.
By default (format=csv, or no format at all) the response is the CSV
itself (text/csv; charset=utf-8, served as an attachment), streamed from
storage: the first row is the header (each requested column’s label, in
the requested order), followed by one row per exported record. A zero-row
export downloads as a header-only CSV.
format=xlsx downloads the same export as an Excel workbook
(application/vnd.openxmlformats-officedocument.spreadsheetml.sheet): one
worksheet with the CSV’s rows and columns, where each cell is typed by its
column’s spreadsheet type: numbers, dates and date-times are real Excel
numbers, dates and date-times carrying that column’s number format, and
everything else is text. The CSV carries the same values as their
formatted text. A value that doesn’t fit its column’s type is written as
its text in both files. The workbook is produced server-side on the
first request and cached, so repeat downloads are cheap. An export whose
rows would not fit on one Excel worksheet (1,048,576 rows including the
header) is refused with a 409 — the CSV download still works and carries
every row.
Only a succeeded run downloads. Every other status is a 404:
queued and running have no file yet, failed never produced one, and
expired means the file passed its retention horizon and was deleted. Poll
GET .../export-runs/{runId} to learn which — the poll stays readable
for every status — and start a new export when the run failed or expired.
The file stays downloadable until the run’s expiresAt, and can be
downloaded any number of times until then.
Required permission: <resource>.export for the entity’s resource (event.export,
exposure.export, quote.export, submission.export, person.export,
organization.export, policy.export), derived from the path’s
{entityType}. See
Permissions.
curl --request GET \
--url https://go.aiinsurance.io/api/v1/companies/{companyId}/entities/{entityType}/export-runs/{runId}/download \
--header 'Authorization: Bearer <token>'import requests
url = "https://go.aiinsurance.io/api/v1/companies/{companyId}/entities/{entityType}/export-runs/{runId}/download"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://go.aiinsurance.io/api/v1/companies/{companyId}/entities/{entityType}/export-runs/{runId}/download', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://go.aiinsurance.io/api/v1/companies/{companyId}/entities/{entityType}/export-runs/{runId}/download",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://go.aiinsurance.io/api/v1/companies/{companyId}/entities/{entityType}/export-runs/{runId}/download"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://go.aiinsurance.io/api/v1/companies/{companyId}/entities/{entityType}/export-runs/{runId}/download")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://go.aiinsurance.io/api/v1/companies/{companyId}/entities/{entityType}/export-runs/{runId}/download")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyExposure Name,Exposure Type
Acme Corp HQ,company
Beta Warehouse,companyAuthorizations
User-principal OAuth 2.0 Bearer authentication. Send a user-scoped Auth0 access token (audience = the app API audience) as Authorization: Bearer <jwt>. The request resolves to the user's identity and is authorized by their Role on the {companyId} in the path — the same role-based permissions the web app enforces. This is the path the MCP connector uses to act on a user's behalf; endpoints that accept it list both BearerAuth and ApiKeyAuth.
Path Parameters
Company identifier
Field Model V1 EXPORTABLE entity type (lowercase kebab-case URL slug): the six
CRUD entity types plus policy. Unlike the CRUD entity routes, policy IS
valid here — a Policy export reads the segment in effect on the asOf date
(defaulting to today).
event, exposure, quote, submission, person, organization, policy The run identifier returned by POST /entities/{entityType}/export-runs. Runs are scoped to their company
AND their entity type: a run id belonging to another company, or started
under a different entity type, returns 404, exactly as an id that
exists nowhere does.
Query Parameters
The file format to download: csv (the default) for the export's CSV,
xlsx for its Excel workbook rendition. Any other value is a 400 —
never silently defaulted, because that would serve a different file
than the one asked for.
csv, xlsx Response
The exported file, streamed as an attachment named
{entityType}-export-{runId}.{format}.
The response is of type string.
