:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"after": {
"anyOf": [
{
"maxLength": 512,
"type": "string"
},
{
"type": "null"
}
],
"description": "The `next` cursor from the previous page. Opaque. Ignored without page_size."
},
"breakdowns": {
"anyOf": [
{
"items": {
"enum": ["type", "team"],
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "Dimensions to break spend down by. Pass `[\"type\"]` for per-product series, `[\"team\"]` for one series per project summed across products, or `[\"type\",\"team\"]` for per-project series within each product. Omit for one aggregate series."
},
"end_date": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "End date (YYYY-MM-DD, UTC), inclusive. Defaults to yesterday if both dates are omitted, or today if only start_date is provided."
},
"interval": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Time bucket size, one of \"day\", \"week\" or \"month\". Default \"day\"."
},
"page_size": {
"anyOf": [
{
"maximum": 1000,
"minimum": 1,
"type": "number"
},
{
"type": "null"
}
],
"description": "Return at most this many series, ranked by total, with a `next` cursor for the page after. A caller that pages never approaches the size this endpoint refuses oversized breakdowns at. Requires a project breakdown."
},
"start_date": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Start date (YYYY-MM-DD, UTC), or \"all\" for 2020-01-01. If both dates are omitted, defaults to 30 days ago."
},
"team_ids": {
"anyOf": [
{
"items": {
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"type": "integer"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "Project IDs to filter by, e.g. `[1,2]`. Omit for every project this request can see: all organization projects for full billing access, or the member-visible and token-scoped projects for member read-only access."
},
"top_projects": {
"anyOf": [
{
"maximum": 200,
"minimum": 1,
"type": "number"
},
{
"type": "null"
}
],
"description": "Maximum number of projects to return, ranked by total spend, when breakdowns includes \"team\". The projects beyond it are folded into one \"All other projects (N)\" series rather than dropped, so the totals still add up to the real bill. Ignored without a team breakdown. Omit it to get every project, which is the default and the right choice for most questions. Set it only when an organization has enough projects that the full response is unwieldy, and say so in your answer, because a limited response names only the largest spenders."
},
"usage_types": {
"anyOf": [
{
"items": {
"minLength": 1,
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "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, signals_spend_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_and_traces_mb_in_period, logs_mb_in_period, apm_tracing_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."
}
},
"type": "object"
}