LatanaDocs Log in to Latana

Customer data export

For each study in your account, Latana makes a CSV file and a manifest, a JSON file that describes the CSV. When the data from a study changes, Latana replaces the two files for that study only. The download API is at https://export.latana.com/v1.

1. Access#

Each request must have the header Authorization: Bearer <token>. An admin of your Latana account issues tokens in Settings › Data export › Download API tokens. Latana can also issue a token for you. If this page shows that data export is not enabled, speak to the Latana team.

Latana shows a token one time only. A token can read all studies of your organisation and no other data. A token is valid for 12 months, and Latana does not renew it automatically. You can revoke a token at any time, and access stops immediately.

2. Get the files#

A typical download of one study has these steps:

  1. Get the list of studies.
  2. Get the manifest for the study. It contains csv.url and csv.sha256.
  3. Get the CSV from csv.url.
  4. Make sure that the SHA-256 checksum of the CSV is the same as csv.sha256.

If Latana replaces the files between step 2 and step 3, step 3 gives 409 stale_manifest. Then get the manifest again. Each manifest always agrees with the CSV at its csv.url.

curl -H "Authorization: Bearer $LATANA_EXPORT_TOKEN" https://export.latana.com/v1/studies
curl -H "Authorization: Bearer $LATANA_EXPORT_TOKEN" https://export.latana.com/v1/studies/<public-id>/manifest
curl -f -H "Authorization: Bearer $LATANA_EXPORT_TOKEN" -o data.csv \
  "https://export.latana.com/v1/studies/<public-id>/data.csv?export_sequence=<n>"

3. Find changes#

Each study has an export_sequence. The number increases only when Latana writes new files for the study. Gaps in the numbers are normal. You can find changes in three ways:

Events#

The event feed and webhooks give the same events:

Event Meaning
study.updated The study has a new CSV and manifest. The event gives the new export_sequence.
study.deleted Latana deleted the study and its files.
study.expired Latana removed the files because the study had no change for 90 days. The files come back at the next change.

Webhooks#

An admin adds a webhook in Settings › Data export › Webhooks. The URL must use https:// on port 443. Your organisation can have 5 webhooks. The JSON body gives the event, the study.public_id, the export_sequence, the sequence and a unique delivery_id. The header X-Latana-Signature: t=<unix time>,v1=<hex> contains the HMAC-SHA256 of <t>.<raw body>, made with your signing secret.

{
  "event": "study.updated",
  "delivery_id": "6f1c0a52-3f7e-4bb4-9a0e-2a1f5c1d9e7b",
  "occurred_at": "2026-10-05T13:19:39Z",
  "study": { "public_id": "f949f880-f671-4469-8195-426e93568e43" },
  "export_sequence": 8,
  "sequence": 42
}

To check the signature, compute the HMAC over the raw request body:

import hashlib, hmac, time

def verify(raw_body: bytes, signature_header: str, secret: str, tolerance=300) -> bool:
    parts = dict(item.split("=", 1) for item in signature_header.split(","))
    timestamp, received = parts.get("t", ""), parts.get("v1", "")
    if not timestamp.isdigit() or abs(time.time() - int(timestamp)) > tolerance:
        return False
    expected = hmac.new(secret.encode(), f"{timestamp}.".encode() + raw_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, received)

Latana expects a 2xx response in 10 seconds. If it does not get one, it sends the event again, 12 times in approximately 3 days. After 3 days with no successful delivery, Latana pauses the webhook and sends an email to your admins. Latana can send an event more than one time, and the order is not guaranteed. In Settings, you can send a test event (ping) and send a delivery again.

What changed#

The manifest for each export tells you what changed in the study. Its changes section compares the export with the previous export of the study. It lists added and removed waves, segments, KPIs and answer options. It also lists waves imported again, renamed segments, segments with changed filters, relabelled KPIs and answer options, and a change of report_type. For the first export of a study, changes.initial is true.

4. Files#

The CSV is UTF-8 and comma-separated, with a header row. It is a full snapshot of one study. Latana sets one of two formats for your organisation. The manifest field report_type gives the format:

The manifest gives the type, unit and meaning of each column. It also lists the waves, segments with their filters, and KPIs in the CSV.

5. Limits and responses#

Code Meaning
401 The token is missing, revoked or expired.
404 The study is not yours, or it has no files at this time.
409 A newer export replaced the file. Get the manifest again.
410 cursor_expired: after is older than 30 days. List your studies again with GET /v1/studies, then continue from oldest_after.
429 More than 120 requests in one minute for your organisation.
503 The API is temporarily not available.

For 429 and 503, wait for the number of seconds in the Retry-After header.

Support#

Email help@latana.com or contact your Latana customer success manager.