Bridgewise Article
Home / Developer Documentation / API Integrations / Bridget Conversation Logs Export API
</>

Developer Documentation

Bridget Conversation Logs Export API

Export your Bridget AI chat conversation history in bulk for compliance archiving, analytics, and audit purposes.

This guide covers the Conversation Logs Export API, which allows you to retrieve Bridget chat interactions (questions asked by end-users and answers returned by Bridget) over any date range. The data is exported as daily files in CSV or JSON format, ready for ingestion into your compliance, analytics, or reporting systems.

What This API Does

? Bulk Export

Retrieve all Bridget Q&A interactions for a date range (up to 100 days per request) as downloadable CSV or JSON files.

? Daily Files

Data is organized into one file per day. Files are generated after each UTC day closes and are immutable once created.

? Two-Step Download

The API returns time-limited download links (presigned URLs). Your code fetches these links, then downloads each file separately.

? Compliance-Ready

Files are byte-identical on every re-download. Ideal for audit trails, regulatory archiving, and tamper-evidence checksumming.

! Key Concept

The API call and the file download are two separate HTTP operations against two different hosts. The API returns download links, not the data itself. Your implementation must perform both steps: (1) call the API to get links, then (2) download each link.

i Prerequisites

This endpoint uses the same authentication as all Bridgewise APIs. You need your Base URL, Tenant ID, and a valid Bearer Token with Config-Tenant scope. All three are provided during onboarding. If you have already integrated any Bridgewise API or widget, you already have these credentials. See the Bridgewise Integration Guide > Authentication section for details on obtaining and refreshing tokens.

1 Quick Start

Export yesterday's conversation logs as a CSV file in two HTTP requests. Replace the placeholder values with the credentials you received during onboarding.

Step 1 — Get download links from the API

cURL
curl -sS "$BASE_URL/tenants/$TENANT_ID/questions/bulk?\
  start_date=2026-05-06&end_date=2026-05-06&format=csv" \
  -H "Authorization: Bearer $TOKEN"

The API responds in under 200ms with a JSON array of download links — one entry per day that has data:

Response (JSON)
[
  {
    "day": "2026-05-06",
    "url": "https://<download-host>/...?signature=...",
    "format": "csv"
  }
]

Step 2 — Download the file (no auth header needed)

Each url in the response is a presigned download link. It is self-authenticating — do not include an Authorization header on this request:

cURL
curl -sS -o 2026-05-06.csv "https://<download-host>/...?signature=..."

# Verify:
head -2 2026-05-06.csv
# message_id,session_id,user_id,timestamp,language,question,answer,...
# b1272aaa-29ad-...,sess-abc-1,user-42,2026-05-06T08:14:23Z,en-US,...
That’s It

The entire contract is: (1) ask the API for download links, (2) download each link. Everything that follows is operational detail — parameters, file schema, error handling, and production-ready code samples.

2 How It Works

Each daily file is pre-built after end-of-day (UTC) and stored internally. When you call the API, no data is computed on the fly — the server validates your request and returns time-limited presigned download URLs that grant read access for 1 hour.

This design has two important consequences:

1
Fast responses

API response time is under 200ms, even for a full 100-day range, because it is only returning links to pre-existing files.

2
Today’s data is not available

Files are generated after each day closes (UTC). The earliest exportable date is always yesterday. Requesting today or a future date returns a 400 error.

3
Files are immutable

Once a day’s file is generated, it never changes. Re-downloading the same day produces byte-identical content, making it suitable for checksumming and tamper-evidence.

Data Flow

Your Backend scheduled job
+ long-term storage
Bridgewise API validate request
issue download links
Object Storage daily conversation files
(time-limited access)

Flow: (1) your backend calls the Bridgewise API for the desired date range → (2) the API returns a list of {day, url, format} entries → (3) your backend downloads each link → (4) downloads return CSV or JSON files.

i Two Hosts, Two Auth Schemes

The API call goes to your Bridgewise {baseUrl} with your bearer token. The file download goes to a separate storage hostname and is pre-authenticated by the signature embedded in the URL — do not add an Authorization header on the download request, and never log presigned URLs (they are temporary credentials).

3 Request Parameters & Validation

Endpoint

GET {baseUrl}/tenants/{tenant_id}/questions/bulk

{baseUrl} is the Bridgewise API base URL provided during onboarding. It differs per environment and integration mode (standard HTTPS vs. mTLS). Do not hardcode a default.

Path Parameters

ParameterTypeRequiredDescription
tenant_idstringYesYour tenant identifier, exactly as provisioned at onboarding.

Query Parameters

ParameterTypeRequiredDefaultDescription
start_dateYYYY-MM-DDYesInclusive start of the date range. Must be ≤ yesterday (UTC).
end_dateYYYY-MM-DDNo= start_dateInclusive end of the range. Use the same value as start_date for a single day.
formatcsv | jsonNojsonOutput format. Both contain the same fields.

Authentication Header

Authorization: Bearer <your_access_token>

The token must have Config-Tenant scope and must belong to the same tenant specified in the path. A mismatched token/tenant returns 403 Forbidden.

Validation Rules

Each validation failure returns HTTP 400 with a JSON body containing a detail field. These are the exact messages the API returns:

TriggerError Message (detail field)
Range includes todayExport for current day is not available. Data is generated after day closure.
Range includes a future dateFuture dates cannot be requested.
Invalid date formatDate has wrong format. Use one of these formats instead: YYYY-MM-DD.
end_date before start_dateend_date must be greater than or equal to start_date.
Invalid format valueOnly csv or json allowed.
Range exceeds 100 daysRange too large. Difference between start_date and end_date should not exceed 100 days.

4 Response Structure

A successful response is a JSON array ordered by date ascending. Each element represents one day in the requested range that contained Bridget conversations.

Example HTTP Exchange

HTTP
GET /tenants/example-tenant/questions/bulk?start_date=2026-05-01
  &end_date=2026-05-03&format=csv HTTP/1.1
Host: api.bridgewise.com
Authorization: Bearer eyJhbGciOiJSUzI1NiIs...
Accept: application/json

HTTP/1.1 200 OK
Content-Type: application/json

[
  {
    "day": "2026-05-01",
    "url": "https://<download-host>/...?signature=...",
    "format": "csv"
  },
  {
    "day": "2026-05-02",
    "url": "https://<download-host>/...?signature=...",
    "format": "csv"
  }
]

Note that May 3rd is absent — this means there were no Bridget conversations on that day.

Response Field Reference

FieldTypeDescription
daystring (YYYY-MM-DD)The UTC day this file covers. At most one file per day per format.
urlstring (URL)Presigned download link. Anyone holding this URL can download the file until it expires (1 hour). Treat it as a credential.
formatstringEither "csv" or "json", matching the format you requested.
i Empty Days Are Omitted

Days with no Bridget activity are silently omitted from the array. A 30-day range may return only 22 entries if 8 days had no conversations. Always iterate over the returned array — do not assume a fixed entry count.

5 Downloaded File Contents

Each daily file contains one row per conversation interaction: one user question, Bridget's answer, and associated metadata. The schema mirrors Bridget's existing /questions endpoint output.

Sample CSV (Header + One Row)

CSV
message_id,session_id,user_id,timestamp,language,question,answer,
companies_mentioned_in_answer,execution_time,...

b1272aaa-29ad-4997-a2a4-62fd76983340,sess-abc-1,user-42,
2026-05-01T08:14:23Z,en-US,"What's Tesla's price trend?",...

Same Row as JSON

JSON
[
  {
    "message_id": "b1272aaa-29ad-4997-a2a4-62fd76983340",
    "session_id": "sess-abc-1",
    "user_id": "user-42",
    "timestamp": "2026-05-01T08:14:23Z",
    "language": "en-US",
    "question": "What's Tesla's price trend?",
    "answer": "Tesla NASDAQ:TSLA is trading at $392.43...",
    "companies_mentioned_in_answer": [27444752],
    "execution_time": 6.84
  }
]

Field Reference

FieldDescription
message_idUnique identifier for this Q&A interaction (UUID).
session_idChat session UUID. Groups consecutive questions from the same conversation.
user_idEnd-user identifier as supplied by your platform (via the userId widget parameter).
tenant_idYour tenant ID (constant within a file).
timestampISO-8601 UTC timestamp of when the question was asked.
languageLanguage code (e.g. en-US, he-IL, ja-JP).
questionRaw user question text as entered.
question_in_englishTranslated question (present when the source language is not English).
answerPlain-text Bridget answer delivered to the end-user.
answer_in_englishTranslated answer (present when the source language is not English).
companies_mentioned_in_questionArray of Bridgewise company IDs detected in the question.
companies_mentioned_in_answerArray of Bridgewise company IDs referenced in the answer.
execution_timeTotal processing time in seconds for generating the answer.
llm_token_usageObject containing input_tokens, output_tokens, and cache_tokens.
feedbackUser thumbs-up/down feedback if provided (null if no feedback given).
i Schema May Expand

The definitive column list is the one in your tenant's first downloaded file. If a new field is added in the future (non-breaking change), it appears as a new column in CSV or a new key in JSON. Always select fields by name, not by column position.

Limits

LimitValue
Max records per daily file30,000
Expected download time per file≤ 8 seconds
Max parallel downloads (server-side cap)100
Presigned URL lifetime (TTL)1 hour from when the API responds
Date range per single API call≤ 100 days
Storage retentionPer your contractual SLA; files are immutable

6 Error Handling

Errors from the API Call (Step 1)

StatusCauseHow to Handle
400Validation failure (see exact messages in Section 3).Fix the parameters. This is deterministic — never retry blindly.
401Token missing, expired, or malformed.Refresh your bearer token using the authentication flow.
403Insufficient scope, or token does not match the tenant_id in the path.Verify the token has Config-Tenant scope and that the path tenant_id matches.
5xxBridgewise transient error.Exponential backoff (1s, 2s, 4s, 8s) with max 5 retries.

Example 401 Response

HTTP
HTTP/1.1 401 Unauthorized
Content-Type: application/json

{
  "detail": "Not valid Token. Please see product documentation
             as for obtaining and including an Authentication Token
             or contact support@bridgewise.com for acquiring
             a proper license."
}

Errors from the File Download (Step 2)

StatusCauseHow to Handle
403Download URL has expired (TTL is 1 hour).Re-call /questions/bulk for that date range to get fresh URLs, then retry only the failed days.
404File not found at that location.Skip — that day had no conversation activity (rare; usually omitted from the API response).
503Download endpoint throttling under high parallelism.Reduce concurrency below 50, retry with backoff.
Network / timeoutTransient connectivity issue.Retry the download. Do not re-call the API unless the URL has expired.

7 Audit, Observability & Support

Audit Trail

Every call to /questions/bulk is logged with caller identity, tenant ID, requested range, format, and response code. These records are available via the Bridgewise usage dashboard for your audit purposes.

Support & Documentation

?
General documentation & onboarding

https://support.bridgewise.com/en/support/solutions

?
Technical issues

support@bridgewise.com — one ticket per topic, do not reply on closed threads.

?
Status & incidents

See the Bridgewise status page referenced in your onboarding pack.

Bridgewise · Bridget Conversation Logs Export API · GET /tenants/{tenant_id}/questions/bulk