subscriptions
subscriptions

get/api/projects/{project_id}/subscriptions/{id}/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/subscriptions/{id}/
  • Auth: HTTP bearer

Path parameters

idinteger required

A unique integer value identifying this subscription.

project_idstring required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Response

idinteger required
resource_type'insight' | 'dashboard' | 'ai_prompt' required
  • insight - Insight
  • dashboard - Dashboard
  • ai_prompt - AI prompt
dashboardinteger nullable

Dashboard ID to subscribe to (mutually exclusive with insight on create).

insightinteger nullable

Insight ID to subscribe to (mutually exclusive with dashboard on create).

insight_short_idstring nullable required
resource_namestring nullable required
dashboard_export_insightsinteger[]

List of insight IDs from the dashboard to include. Required for dashboard subscriptions, max 20.

promptstring nullable

Free-text prompt that drives the AI-generated report. Required when resource_type is 'ai_prompt'. Max 4000 characters.

target_type'email' | 'slack' | 'teams' required
  • email - Email
  • slack - Slack
  • teams - Microsoft Teams
target_valuestring required

Recipient(s): comma-separated email addresses for email, Slack channel name/ID for slack, or a Microsoft Teams webhook URL for teams. A Teams webhook URL is only ever returned as its host, because the URL authorizes a post to the channel by itself. On update, omit the field to keep the stored URL, or send a full URL to replace it.

frequency'daily' | 'weekly' | 'monthly' | 'yearly' required
  • daily - Daily
  • weekly - Weekly
  • monthly - Monthly
  • yearly - Yearly
intervalinteger required

Interval multiplier (e.g. 2 with weekly frequency means every 2 weeks). Required on create; must be 1 or greater.

byweekdaystring[] nullable

Days of week for daily or weekly subscriptions: monday, tuesday, wednesday, thursday, friday, saturday, sunday.

bysetposinteger nullable

Position within byweekday set for monthly frequency (e.g. 1 for first, -1 for last).

countinteger nullable

Total number of deliveries before the subscription stops. Null for unlimited.

start_datestring date-time required

When to start delivering (ISO 8601 datetime). The date anchors the recurrence and may be in the past. Deliveries run on half-hour cycles at :00 and :30. Other minute values are accepted for backward compatibility, but delivery happens during the next cycle instead of at that exact minute.

until_datestring date-time nullable

When to stop delivering (ISO 8601 datetime). Null for indefinite.

created_atstring date-time required
deletedboolean

Set to true to soft-delete. Subscriptions cannot be hard-deleted.

enabledboolean

Whether the subscription is active. Set to false to pause delivery without deleting. Auto-set to false when the delivery integration becomes invalid.

titlestring nullable

Human-readable name for this subscription.

summarystring required

Human-readable schedule summary, e.g. 'sent daily'.

next_delivery_datestring date-time nullable required
integration_idinteger nullable

ID of a connected Slack integration. Required when target_type is slack.

invite_messagestring nullable

Optional message included in the invitation email when adding new recipients.

send_test_nowboolean

Whether to immediately deliver the subscription once on save so the editor can confirm it looks right. Defaults to true on create. When omitted on update, a delivery is sent only if the edit changed what gets delivered (recipient, channel, source) or re-enabled the subscription. The recurring schedule is unaffected.

summary_enabledboolean

Whether to attach an AI-generated summary to each delivery (insight and dashboard subscriptions only). Requires the organization to have approved AI data processing, and is subject to the org's active-summary cap and AI credit budget; otherwise the write is rejected. Not applicable to prompt subscriptions, which are themselves AI-generated.

summary_prompt_guidestring

Optional free-text guidance (max 500 chars) steering the AI summary, e.g. which metrics to emphasize. Only settable when AI summary context is enabled for the organization; clearing it (empty string) is always allowed.

Changes

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