Get an organization usage export
Get an organization usage export with the FLORA API: GET /organizations/{organizationId}/usage-exports/{exportId}.
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.
GET https://app.flora.ai/api/v1/organizations/{organizationId}/usage-exports/{exportId}Auth: API key as a bearer token,
Authorization: Bearer $FLORA_API_KEY. See Authentication.TypeScript SDK:
client.organizations.usageExports.retrieve().Operation ID:
getOrganizationUsageExport.
Example
curl -X GET 'https://app.flora.ai/api/v1/organizations/org_abc123/usage-exports/export_abc123' \
-H "Authorization: Bearer $FLORA_API_KEY"import { FloraClient } from '@flora-ai/flora';
const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });
const usageExport = await client.organizations.usageExports.retrieve({
organizationId: 'org_abc123',
exportId: 'export_abc123',
});
console.log(usageExport);Path parameters
organizationId
string
Yes
Organization identifier. Pattern: ^org_\S+$. Example: org_abc123.
exportId
string
Yes
Usage export identifier. Pattern: ^export_\S+$. Example: export_abc123.
Responses
200: Export returned.
export_id
string
Yes
Usage export identifier. Pattern: ^export_\S+$. Example: export_abc123.
organization_id
string
Yes
Organization identifier. Pattern: ^org_\S+$. Example: org_abc123.
status
string
Yes
queued and running exports have no files yet; poll until completed or failed. One of: queued, running, completed, failed.
start_date
string
Yes
UTC calendar day in YYYY-MM-DD form. Pattern: ^\d{4}-\d{2}-\d{2}$. Example: 2026-08-01.
end_date
string
Yes
UTC calendar day in YYYY-MM-DD form. Pattern: ^\d{4}-\d{2}-\d{2}$. Example: 2026-08-01.
workspace_count
integer
Yes
Workspaces included in the export. At least 0.
row_count
integer or null
Yes
Total data rows across all parts; null until completed. At least 0.
error
string or null
Yes
Failure reason when status is failed
created_at
integer
Yes
When the export was requested (ms since epoch)
completed_at
integer or null
Yes
When the export finished (ms since epoch); null while in progress
files
array of objects
Yes
CSV parts to download; empty until the export completes
files[].part
integer
Yes
1-based part number; large exports are split. At least 0.
files[].filename
string
Yes
CSV filename
files[].download_url
string (uri)
Yes
Direct download URL for this CSV part
files[].row_count
integer
Yes
Data rows in this part. At least 0.
files[].byte_size
integer
Yes
Size of this part in bytes. At least 0.
Errors
Every error has the same body: error.code, error.message, and error.fields on validation errors. See Errors for how to recover from each code.
400
invalid_json, input_validation_error
The body isn't valid JSON, or an input failed validation (fields lists each one).
401
unauthorized, invalid_api_key
The API key is missing, invalid or revoked.
402
insufficient_credits
The workspace balance is too low for this request.
403
forbidden, paid_plan_required
The key can't do this, or the workspace plan doesn't include it.
404
not_found
The resource doesn't exist or isn't visible to this key.
409
idempotency_duplicate, revision_conflict
Duplicate Idempotency-Key or a stale base_revision.
429
rate_limited
Too many requests. Back off and retry.
500
unknown_error, internal_error
Something failed on FLORA's side. Retry with backoff.
503
temporarily_unavailable
Authorization is temporarily unavailable. Retry later.
Last updated
Was this helpful?