Request
- Base URL: https://us.posthog.com
- URL: https://us.posthog.com/api/projects/{project_id}/subscriptions/{id}/
- Auth: HTTP bearer
Path parameters
A unique integer value identifying this subscription.
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
Request body
- insight - Insight
- dashboard - Dashboard
- ai_prompt - AI prompt
Dashboard ID to subscribe to (mutually exclusive with insight on create).
Insight ID to subscribe to (mutually exclusive with dashboard on create).
List of insight IDs from the dashboard to include. Required for dashboard subscriptions, max 20.
Free-text prompt that drives the AI-generated report. Required when resource_type is 'ai_prompt'. Max 4000 characters.
- email - Email
- slack - Slack
- teams - Microsoft Teams
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.
- daily - Daily
- weekly - Weekly
- monthly - Monthly
- yearly - Yearly
Interval multiplier (e.g. 2 with weekly frequency means every 2 weeks). Required on create; must be 1 or greater.
Days of week for daily or weekly subscriptions: monday, tuesday, wednesday, thursday, friday, saturday, sunday.
Position within byweekday set for monthly frequency (e.g. 1 for first, -1 for last).
Total number of deliveries before the subscription stops. Null for unlimited.
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.
When to stop delivering (ISO 8601 datetime). Null for indefinite.
Set to true to soft-delete. Subscriptions cannot be hard-deleted.
Whether the subscription is active. Set to false to pause delivery without deleting. Auto-set to false when the delivery integration becomes invalid.
Human-readable name for this subscription.
Human-readable schedule summary, e.g. 'sent daily'.
ID of a connected Slack integration. Required when target_type is slack.
Optional message included in the invitation email when adding new recipients.
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.
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.
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.
Response
- insight - Insight
- dashboard - Dashboard
- ai_prompt - AI prompt
Dashboard ID to subscribe to (mutually exclusive with insight on create).
Insight ID to subscribe to (mutually exclusive with dashboard on create).
List of insight IDs from the dashboard to include. Required for dashboard subscriptions, max 20.
Free-text prompt that drives the AI-generated report. Required when resource_type is 'ai_prompt'. Max 4000 characters.
- email - Email
- slack - Slack
- teams - Microsoft Teams
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.
- daily - Daily
- weekly - Weekly
- monthly - Monthly
- yearly - Yearly
Interval multiplier (e.g. 2 with weekly frequency means every 2 weeks). Required on create; must be 1 or greater.
Days of week for daily or weekly subscriptions: monday, tuesday, wednesday, thursday, friday, saturday, sunday.
Position within byweekday set for monthly frequency (e.g. 1 for first, -1 for last).
Total number of deliveries before the subscription stops. Null for unlimited.
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.
When to stop delivering (ISO 8601 datetime). Null for indefinite.
Set to true to soft-delete. Subscriptions cannot be hard-deleted.
Whether the subscription is active. Set to false to pause delivery without deleting. Auto-set to false when the delivery integration becomes invalid.
Human-readable name for this subscription.
Human-readable schedule summary, e.g. 'sent daily'.
ID of a connected Slack integration. Required when target_type is slack.
Optional message included in the invitation email when adding new recipients.
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.
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.
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.