organizations
billing

Usage over time

In beta: the organization billing API is behind the organization-billing-api feature flag and answers 403 without it, so ask support for access. Its shapes may change while it is in beta.

get/api/organizations/{organization_id}/billing/usage/timeseries/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/organizations/{organization_id}/billing/usage/timeseries/
  • Auth: HTTP bearer

Path parameters

organization_idstring required

ID of the organization you're trying to access. To find the ID of the organization, make a call to /api/organizations/.

Query parameters

breakdownsstring nullable

JSON-encoded array of breakdown dimensions. Omit it for one series across the whole organization. Pass ["type"] for a series per product. Pass ["type","team"] for a series per product per project. To break usage down by project, pass "type" with "team": billing counts usage per product, and the counts do not add up across products.

cursorstring nullable

The cursor from a previous page's next link. Opaque. Ignored without limit.

end_datestring nullable

End date (YYYY-MM-DD, UTC), inclusive. Defaults to yesterday if both dates are omitted, or today if only start_date is provided.

intervalstring nullable
limitinteger nullable

Series per page, ranked by total, with a next link for the page after. Requires a project breakdown and is ignored without one. Omit it to get every series at once.

start_datestring nullable

Start date (YYYY-MM-DD, UTC), or "all" for 2020-01-01. If both dates are omitted, defaults to 30 days ago.

team_idsstring nullable

JSON-encoded array of numeric team/project IDs to filter on, for example [1,2]. Omit for all projects available to the caller. Full billing-access callers can read all organization projects; member read-only callers are limited to visible projects and any project scope on their token.

top_projectsinteger nullable

With a project breakdown, return only this many highest-usage projects and fold the rest into a single 'all other projects' series, so the totals still reconcile. Omit it to get every project.

usage_typesstring nullable

JSON-encoded array of usage type identifiers to filter on. Valid values: event_count_in_period, exceptions_captured_in_period, recording_count_in_period, rows_synced_in_period, free_historical_rows_synced_in_period, survey_responses_count_in_period, mobile_recording_count_in_period, mobile_billable_recording_count_in_period, billable_feature_flag_requests_count_in_period, enhanced_persons_event_count_in_period, ai_event_count_in_period, cdp_billable_invocations_in_period, rows_exported_in_period, ai_credits_used_in_period, signals_credits_used_in_period, posthog_code_credits_used_in_period, posthog_code_token_credits_used_in_period, sandbox_compute_credits_used_in_period, sandbox_compute_cpu_millicore_seconds_in_period, sandbox_compute_memory_mib_seconds_in_period, workflow_emails_sent_in_period, workflow_billable_invocations_in_period, logs_mb_in_period, logs_retention_30d_mb_in_period, logs_retention_mb_days_in_period, replay_vision_credits_used_in_period, data_pipelines, group_analytics. E.g. ["event_count_in_period","recording_count_in_period"]. Omit for all types.

Response

countinteger required
nextstring uri nullable required
previousstring uri nullable required

Changes

No recorded changes to this operation across all 1 revision of this API.