Subscriptions

For instructions on how to authenticate to use this endpoint, see API overview.

Endpoints

GET
GET

List all subscriptions summaries

Completed deliveries that include an AI summary, across every active subscription on one insight or dashboard, newest first. Requires viewer access to the insight or dashboard.

Required API key scopes

subscription:read

Query parameters

  • cursor
    string
  • dashboard
    integer
  • insight
    integer

Response


Example request

GET /api/projects/:project_id/subscriptions/summaries
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/subscriptions/summaries/

Example response

Status 200
RESPONSE
{
"count": 123,
"next": "http://api.example.org/accounts/?cursor=cD00ODY%3D\"",
"previous": "http://api.example.org/accounts/?cursor=cj0xJnA9NDg3",
"results": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"subscription": 0,
"subscription_title": "string",
"target_type": "string",
"change_summary": "string",
"period_start": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z"
}
]
}

List all subscriptions summaries

Completed deliveries that include an AI summary, across every active subscription on one insight or dashboard, newest first. Requires viewer access to the insight or dashboard.

Required API key scopes

subscription:read

Query parameters

  • cursor
    string
  • dashboard
    integer
  • insight
    integer

Response


Example request

GET /api/projects/:project_id/subscriptions/summaries
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/subscriptions/summaries/

Example response

Status 200
RESPONSE
{
"count": 123,
"next": "http://api.example.org/accounts/?cursor=cD00ODY%3D\"",
"previous": "http://api.example.org/accounts/?cursor=cj0xJnA9NDg3",
"results": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"subscription": 0,
"subscription_title": "string",
"target_type": "string",
"change_summary": "string",
"period_start": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z"
}
]
}

Retrieve subscriptions summary quota

Required API key scopes

subscription:read

Example request

GET /api/projects/:project_id/subscriptions/summary_quota
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/subscriptions/summary_quota/

Example response

Status 200 Org-wide AI summary quota: count of currently-active summaries and the limit for the org's plan tier. `limit` is null when no cap is configured.

Retrieve subscriptions summary quota

Required API key scopes

subscription:read

Example request

GET /api/projects/:project_id/subscriptions/summary_quota
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/subscriptions/summary_quota/

Example response

Status 200 Org-wide AI summary quota: count of currently-active summaries and the limit for the org's plan tier. `limit` is null when no cap is configured.