Skip to main content
POST
Export AI credit usage to CSV

Authorizations

Authorization
string
header
required

An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.

Body

application/json
view
enum<string>
required

What the file lists: users (usage by person; needs settings:update), flows (usage by flow) or log (every call, newest first)

Available options:
users,
flows,
log
end
string<date-time> | null

Exclusive. With start or alone, replaces the contract period; no offset is UTC

start
string<date-time> | null

Inclusive. With end or alone, replaces the contract period; no offset is UTC

tier
integer | null

Only calls billed at this tier: 1 (LLM workflows), 2 (agents), 3 (documents)

Required range: 1 <= x <= 3

Response

200 - application/json

Successful Response

column_count
integer
required

How many columns the file has

columns
string[]
required

The file's columns: the record's standard keys, then its custom field keys. An MCP answer lists the first ones that fit it; the file always has every column

expires_at
string
required

When the link stops working, ISO 8601 UTC

file_name
string
required
object
string
required

The records exported, e.g. accounts

rows
integer
required

Records in the file

truncated
boolean
required

More records matched than the file holds (at most max_rows, 10,000 at most): narrow the filter or the view to export the rest

url
string
required

A signed link that downloads the CSV with a plain GET for 60 minutes; anyone holding it can, so treat it as a secret and give it only to the person who asked

preview
Preview · object[]

The first rows (up to 10), each with only its non-empty cells, as the file has them; an MCP answer holds as many as fit it