Skip to main content
POST
Start an export

Authorizations

Authorization
string
header
required

A scoped token minted in Settings → API tokens. Send it as Authorization: Bearer tplt_… or X-API-Key: tplt_….

Headers

Idempotency-Key
string

Retry-safe key. The first response for a given key is cached for 24 hours and replayed on a repeat, with Idempotency-Replayed: true set.

Body

application/json
video_ids
integer[]
required

The videos to export. Between 1 and 50 IDs. Every ID must exist in this workspace.

Required array length: 1 - 50 elements
from
string<date>
required

Start of the range, as an ISO date. Required.

to
string<date>
required

End of the range, as an ISO date. Must be on or after from. Required.

format
enum<string>
required

The file format. Required.

Available options:
csv,
json
type
enum<string>
required

Which dataset to export. Required.

Available options:
events,
summary,
retention,
conversions

Response

Accepted. The export is queued. Poll its status to get the download link.

export_id
string

The export's ID, e.g. tpex_9f2c1a7e4d3b4a11. Poll it to get the download link.

Example:

"tpex_9f2c1a7e4d3b4a11"

status
string

Always pending at this point.

Example:

"pending"