Reading data
Statistics
The org-wide stats endpoints are the same shape as per-campaign stats but aggregated across everything you've ever run. Use them for executive dashboards or for charting long-term CPM trends.
GET
/statsOrganization-wide statistics
Like
/campaigns/{id}/stats but aggregated org-wide. Same ?include= sections, plus a campaigns section that gives a per-campaign breakdown.includestringComma-separated: growth, production, spend, campaigns, top_videos.
const response = await fetch(
"https://ugcbloom.com/api/v1/stats", {
headers: {
"Authorization": "Bearer ugcb_live_your_api_key_here"
}
}
);
const data = await response.json();GET
/stats/historicalDaily org-wide time-series
One row per day across the whole org. Includes cumulative CPM with and without fees so you can chart long-term efficiency.
daysintegerNumber of days of history (default: 30, max: 365)
const response = await fetch(
"https://ugcbloom.com/api/v1/stats/historical", {
headers: {
"Authorization": "Bearer ugcb_live_your_api_key_here"
}
}
);
const data = await response.json();