Skip to content

Get an organization usage export

GET
/organizations/{organizationId}/usage-exports/{exportId}
import { FloraClient } from '@flora-ai/flora';
const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });
const usageExport = await client.organizations.usageExports.retrieve({
organizationId: '<organizationId>',
exportId: '<exportId>',
});
console.log(usageExport);

Returns the status of a usage export and, once completed, its CSV download URLs. Only the user who requested an export can read it; other exports return 404. Exports are kept for seven days. Requires an organization with multiple workspaces enabled, and the credential’s user must hold billing permissions in that organization. An API key works for the organization that owns its workspace; an OAuth token works for any organization the user administers. Other organizations return 403.

Error responses use the standard error body.

organizationId
required

Organization identifier

string
/^org_\S+$/

Organization identifier

exportId
required

Usage export identifier

string
/^export_\S+$/

Usage export identifier

Export returned.

Media type application/json
object
export_id
required

Usage export identifier

string
/^export_\S+$/
organization_id
required

Organization identifier

string
/^org_\S+$/
status
required

Queued and running exports have no files yet; poll until completed or failed

string
Allowed values: queued running completed failed
start_date
required

UTC calendar day in YYYY-MM-DD form

string
/^\d{4}-\d{2}-\d{2}$/
end_date
required

UTC calendar day in YYYY-MM-DD form

string
/^\d{4}-\d{2}-\d{2}$/
workspace_count
required

Workspaces included in the export

integer
row_count
required
Any of:
integer
error
required
Any of:
string
created_at
required

When the export was requested (ms since epoch)

integer
completed_at
required
Any of:
integer
files
required

CSV parts to download; empty until the export completes

Array<object>
object
part
required

1-based part number; large exports are split

integer
filename
required

CSV filename

string
download_url
required

Direct download URL for this CSV part

string format: uri
row_count
required

Data rows in this part

integer
byte_size
required

Size of this part in bytes

integer
Example
{
"export_id": "export_abc123",
"organization_id": "org_abc123",
"status": "queued",
"start_date": "2026-08-01",
"end_date": "2026-08-01"
}