Broadcast Audience

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

Endpoints

GET
POST

Retrieve broadcast audience suggestions

Broadcast audiences written by AI from the project's own events. Both calls are free for the customer.

Required API key scopes

hog_flow:readquery:read

Response


Example request

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

Example response

Status 200
RESPONSE
{
"status": "ready",
"suggestions": [
{
"id": "string",
"name": "string",
"description": "string",
"reason": "string",
"kind": "not_yet",
"event": "string",
"missing_event": "string",
"window_days": 0,
"min_count": 0,
"reachable_count": 0,
"cohort_filters": null
}
]
}

Create broadcast audience suggestions

Broadcast audiences written by AI from the project's own events. Both calls are free for the customer.

Required API key scopes

hog_flow:writequery:read

Request parameters

  • refresh
    boolean
    Default: false

Response


Example request

POST /api/projects/:project_id/broadcast_audience_suggestions/generate
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/broadcast_audience_suggestions/generate/\
-d refresh="boolean"

Example response

Status 200
RESPONSE
{
"status": "ready",
"suggestions": [
{
"id": "string",
"name": "string",
"description": "string",
"reason": "string",
"kind": "not_yet",
"event": "string",
"missing_event": "string",
"window_days": 0,
"min_count": 0,
"reachable_count": 0,
"cohort_filters": null
}
]
}