Exports organization-level analytics as a CSV file. The format is always CSV, and when no date range is provided the report covers the last 30 days. Authenticate with an organization API key sent in `X-API-Key` or as a Bearer token and carrying the exact `export:read` scope. API-key access also requires the Automation & API module (`automation_api`). Authorized dashboard sessions remain supported where the route already permits them. The request is isolated to the authenticated organization. Resource and site/project identifiers must belong to that organization; out-of-scope identifiers are not disclosed. Always returns a `text/csv` attachment. When omitted, the date window defaults to the previous 30 days ending at request time; explicit `date_from` and `date_to` are interpreted as ISO 8601 instants. Retry behavior: This read-only operation is safe to retry.
curl --request GET \
'https://api.convor.io/api/export/analytics?format=csv' \
--header 'Accept: text/csv' \
--header 'Authorization: Bearer convor_sk_...'const response = await fetch("https://api.convor.io/api/export/analytics?format=csv", {
method: "GET",
headers: {
"Accept": "text/csv",
"Authorization": "Bearer convor_sk_..."
},
});
const contentType = response.headers.get("content-type") ?? "";
const data = response.status === 204
? null
: contentType.includes("json")
? await response.json()
: contentType.startsWith("text/")
? await response.text()
: await response.blob();
if (!response.ok) {
const message = typeof data === "object" && data !== null
&& "error" in data && typeof data.error === "object"
&& data.error !== null && "message" in data.error
? String(data.error.message)
: "Convor API request failed (" + response.status + ")";
throw new Error(message);
}
console.log(data);Was this page helpful?
Bulk export conversations with filters
Streams conversations with filters as CSV or JSON, including operator names and flattened message content. `format` defaults to `csv`, `redact_pii` defaults to `false`, and omitted `status`, `operatorId`, `tags`, `dateFrom`, or `dateTo` leave that filter unset. Authenticate with an organization API key sent in `X-API-Key` or as a Bearer token and carrying the exact `export:write` scope. API-key access also requires the Automation & API module (`automation_api`). Authorized dashboard sessions remain supported where the route already permits them. The request is isolated to the authenticated organization. Resource and site/project identifiers must belong to that organization; out-of-scope identifiers are not disclosed. Streams filtered conversations as CSV or JSON. `format` defaults to CSV; status, operator, tag, and date filters are optional. `redact_pii=true` masks recognized emails and phone numbers in message text. The export is audited after streaming. After a connection failure, do not automatically repeat a large export without checking whether the client already received a complete attachment. Retry behavior: This operation is not idempotent. After an ambiguous timeout, read the resource state before retrying to avoid duplicate work, messages, files, bookings, exports, or events.
Export conversations with messages
Streams conversations from the current organization as CSV or JSON, including flattened message content for each conversation. The `format` query parameter defaults to `json`, and `redact_pii` defaults to `false`. Authenticate with an organization API key sent in `X-API-Key` or as a Bearer token and carrying the exact `export:read` scope. API-key access also requires the Automation & API module (`automation_api`). Authorized dashboard sessions remain supported where the route already permits them. The request is isolated to the authenticated organization. Resource and site/project identifiers must belong to that organization; out-of-scope identifiers are not disclosed. `format` defaults to JSON. CSV is returned as `text/csv`; JSON is streamed as an array. `date_from` and `date_to` are optional independent ISO 8601 boundaries, and `redact_pii=true` masks recognized emails and phone numbers in exported message text. The response includes `Content-Disposition` and should be streamed to storage rather than buffered for large organizations. Exports exceeding the configured row limit fail before streaming begins. Retry behavior: This read-only operation is safe to retry.
/api/export/analyticsOrganization API key supplied as Authorization: Bearer convor_sk_....
In: header
text/csv
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
"metric,value,period_start,period_end\nTotal Conversations,42,2026-07-01T00:00:00.000Z,2026-07-31T23:59:59.000Z"{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}