{"openapi":"3.1.0","info":{"title":"Webhooks","version":"1.0.0"},"paths":{},"webhooks":{"subscribed":{"post":{"operationId":"subscribed","summary":"Newsletter List Subscription Subscribed <Badge intent=\"warning\" minimal outlined>Beta</Badge>","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_newsletter_list_subscription:NewsletterListSubscription"}}}}}},"unsubscribed":{"post":{"operationId":"unsubscribed","summary":"Newsletter List Subscription Unsubscribed <Badge intent=\"warning\" minimal outlined>Beta</Badge>","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_newsletter_list_subscription:NewsletterListSubscription"}}}}}},"paused":{"post":{"operationId":"paused","summary":"Subscription Paused","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_subscription:Subscription"}}}}}},"resumed":{"post":{"operationId":"resumed","summary":"Subscription Resumed","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_subscription:Subscription"}}}}}},"sent":{"post":{"operationId":"sent","summary":"Post Sent","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_post:Post"}}}}}},"updated":{"post":{"operationId":"updated","summary":"Post Updated","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_post:Post"}}}}}},"scheduled":{"post":{"operationId":"scheduled","summary":"Post Scheduled","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_post:Post"}}}}}},"created":{"post":{"operationId":"created","summary":"Subscription Created","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_subscription:Subscription"}}}}}},"confirmed":{"post":{"operationId":"confirmed","summary":"Subscription Confirmed","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_subscription:Subscription"}}}}}},"deleted":{"post":{"operationId":"deleted","summary":"Subscription Deleted","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_subscription:Subscription"}}}}}},"upgraded":{"post":{"operationId":"upgraded","summary":"Subscription Upgraded","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_subscription:Subscription"}}}}}},"downgraded":{"post":{"operationId":"downgraded","summary":"Subscription Downgraded","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_subscription:Subscription"}}}}}},"tier-paused":{"post":{"operationId":"tier-paused","summary":"Subscription Tier Paused","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_subscription:Subscription"}}}}}},"tier-resumed":{"post":{"operationId":"tier-resumed","summary":"Subscription Tier Resumed","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_subscription:Subscription"}}}}}},"tier-added":{"post":{"operationId":"tier-added","summary":"Subscription Tier Added","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_subscription:Subscription"}}}}}},"tier-deleted":{"post":{"operationId":"tier-deleted","summary":"Subscription Tier Deleted","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_subscription:Subscription"}}}}}},"submitted":{"post":{"operationId":"submitted","summary":"Survey Response Submitted","responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_survey:SurveyResponse"}}}}}}},"components":{"schemas":{"type_newsletter_list_subscription:NewsletterListSubscriptionStatus":{"type":"string","enum":["pending","active","inactive","paused"],"description":"The status of the newsletter list subscription.","title":"NewsletterListSubscriptionStatus"},"type_newsletter_list_subscription:NewsletterListSubscriptionData":{"type":"object","properties":{"id":{"type":"string","description":"The prefixed ID of the newsletter list subscription."},"list_name":{"type":"string","description":"The name of the newsletter list."},"subscription_id":{"type":"string","description":"The prefixed ID of the subscription."},"email":{"type":"string","description":"The email address of the subscriber."},"status":{"$ref":"#/components/schemas/type_newsletter_list_subscription:NewsletterListSubscriptionStatus","description":"The status of the newsletter list subscription."},"subscribed_at":{"type":"integer","description":"The time the subscriber was added to the list. Measured in seconds since the Unix epoch."},"unsubscribed_at":{"type":"integer","description":"The time the subscriber was removed from the list. Measured in seconds since the Unix epoch."},"created":{"type":"integer","description":"The time the newsletter list subscription was created. Measured in seconds since the Unix epoch."},"updated":{"type":"integer","description":"The time the newsletter list subscription was last updated. Measured in seconds since the Unix epoch."}},"required":["id","list_name","subscription_id","email","status","created","updated"],"title":"NewsletterListSubscriptionData"},"type_newsletter_list_subscription:NewsletterListSubscription":{"type":"object","properties":{"uid":{"type":"string","description":"The prefixed event ID, unique to each webhook event."},"event_timestamp":{"type":"integer","description":"The date the event was created. Measured in seconds since the Unix epoch."},"event_type":{"type":"string","description":"The event type."},"data":{"$ref":"#/components/schemas/type_newsletter_list_subscription:NewsletterListSubscriptionData"}},"title":"NewsletterListSubscription"},"type_post:PostStatus":{"type":"string","enum":["draft","confirmed","archived"],"description":"The status of the post.<br>`draft` - not been scheduled.<br>`confirmed` - The post will be active after the `scheduled_at`.<br>`archived` - The post is no longer active.","title":"PostStatus"},"type_post:PostData":{"type":"object","properties":{"audience":{"type":"string","description":"The audience that the post is available to on the web. Only applicable if the platform is `web` or `both`."},"authors":{"type":"array","items":{"type":"string"},"description":"An array of author names"},"content_tags":{"type":"array","items":{"type":"string"},"description":"All content tags that were associated with the post."},"created":{"type":"integer","description":"The time the post was created. Measured in seconds since the Unix epoch"},"displayed_date":{"type":"integer","description":"The time displayed in place of the `publish_date`. Measured in seconds since the Unix epoch"},"id":{"type":"string","description":"The prefixed post id"},"preview_text":{"type":"string","description":"The email preview text"},"publish_date":{"type":"integer","description":"The time the post was set to be published. Measured in seconds since the Unix epoch"},"slug":{"type":"string","description":"The web slug where this post can be accessed."},"split_tested":{"type":"boolean","description":"A flag to indicate if a split test was done. Only applicable to email posts."},"status":{"$ref":"#/components/schemas/type_post:PostStatus","description":"The status of the post.<br>`draft` - not been scheduled.<br>`confirmed` - The post will be active after the `scheduled_at`.<br>`archived` - The post is no longer active."},"subject_line":{"type":"string","description":"The email subject line. In cases of A/B Testing, this will be adjusted to the winning subject line."},"subtitle":{"type":"string","description":"The subtitle displayed in web views"},"thumbnail_url":{"type":"string","description":"The URL of the thumbnail. Defaults to the Publication logo if not set."},"title":{"type":"string","description":"The title displayed in web views"},"web_url":{"type":"string","description":"The full URL where this post can be accessed on the web. Only applicable if the platform is `web` or `both`."},"platform":{"type":"string","description":"The platform that the post is or will be published to."},"meta_default_description":{"type":"string","description":"Meta tag description for the post, called SEO Description in the admin UI"},"meta_default_title":{"type":"string","description":"Meta tag title for the post, called SEO Title in the admin UI"},"hidden_from_feed":{"type":"boolean","description":"A flag to indicate if the post is hidden from the website feed."},"enforce_gated_content":{"type":"boolean","description":"A flag to indicate if the post enforces gated content for non-subscribers."},"email_capture_popup":{"type":"boolean","description":"A flag to indicate if popup email capture is enabled for this post."}},"required":["audience","authors","content_tags","created","id","preview_text","slug","split_tested","status","subject_line","subtitle","thumbnail_url","title","platform","hidden_from_feed","enforce_gated_content","email_capture_popup"],"title":"PostData"},"type_post:Post":{"type":"object","properties":{"uid":{"type":"string","description":"The prefixed event ID, unique to each webhook event."},"event_timestamp":{"type":"integer","description":"The date the event was created. Measured in seconds since the Unix epoch."},"event_type":{"type":"string","description":"The event type."},"data":{"$ref":"#/components/schemas/type_post:PostData"}},"title":"Post"},"type_subscription:SubscriptionDataStatus":{"type":"string","enum":["validating","invalid","pending","active","inactive","needs_attention"],"description":"The status of the subscription.","title":"SubscriptionDataStatus"},"type_subscription:CustomFieldKind":{"type":"string","enum":["string","integer","number","boolean","date","datetime","list"],"description":"The type of the custom field.","title":"CustomFieldKind"},"type_subscription:CustomFieldValue":{"type":"object","properties":{"name":{"type":"string","description":"The display name of the custom field."},"kind":{"$ref":"#/components/schemas/type_subscription:CustomFieldKind","description":"The type of the custom field."},"value":{"type":"string","description":"The formatted value of the custom field. The actual JSON type depends on the kind: - string: the value as a string - integer, number: the value as a number (JSON number type) - boolean: true or false (JSON boolean type) - date: formatted date string (e.g., \"Jan 15, 2024\") - datetime: formatted date and time string (e.g., \"Jan 15, 2024 3:45 PM\") - list: comma-separated values as a string"}},"required":["name","kind"],"title":"CustomFieldValue"},"type_subscription:SubscriptionData":{"type":"object","properties":{"created":{"type":"integer","description":"The time the subscription was created. Measured in seconds since the Unix epoch."},"email":{"type":"string","description":"The email address of the subscription."},"id":{"type":"string","description":"The prefixed ID of the subscription."},"referral_code":{"type":"string","description":"The code associated to this subscriber to refer others. When a new subscription is created with this referral code, credit for the referral goes to this subscription."},"referring_site":{"type":"string","description":"The website that the subscriber was referred from."},"status":{"$ref":"#/components/schemas/type_subscription:SubscriptionDataStatus","description":"The status of the subscription."},"subscription_tier":{"type":"string","description":"The tier of the subscription."},"subscription_premium_tier_names":{"type":"array","items":{"type":"string"},"description":"The names of the premium tiers associated with the subscription."},"stripe_customer_id":{"type":"string","description":"The Stripe customer ID associated with the subscription."},"utm_campaign":{"type":"string","description":"The acquisition campaign that the subscriber was acquired from."},"utm_channel":{"type":"string","description":"The channel that the subscriber was acquired from."},"utm_medium":{"type":"string","description":"The medium that the subscriber was acquired from."},"utm_source":{"type":"string","description":"The source that the subscriber was acquired from."},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/type_subscription:CustomFieldValue"},"description":"An array of custom field values that have been set on the subscription. Each custom field value includes the field name, kind (type), and formatted value."},"tags":{"type":"array","items":{"type":"string"},"description":"An array of tag names that have been applied to the subscription."}},"title":"SubscriptionData"},"type_subscription:Subscription":{"type":"object","properties":{"uid":{"type":"string","description":"The prefixed event ID, unique to each webhook event."},"event_timestamp":{"type":"integer","description":"The date the event was created. Measured in seconds since the Unix epoch."},"event_type":{"type":"string","description":"The event type."},"data":{"$ref":"#/components/schemas/type_subscription:SubscriptionData"}},"title":"Subscription"},"type_survey:SurveyResponseQuestion":{"type":"object","properties":{"answer":{"type":"string","description":"The answer provided to the question."},"prompt":{"type":"string","description":"The question that was asked."},"type":{"type":"string","description":"The type of question asked (e.g. multiple choice)."}},"title":"SurveyResponseQuestion"},"type_survey:SurveyResponseAnswer":{"type":"object","properties":{"answer":{"type":"string","description":"The answer provided to the question."},"created":{"type":"integer","description":"The time the answer was created. Measured in seconds since the Unix epoch."},"id":{"type":"integer","description":"The ID of the answer."},"question_data":{"$ref":"#/components/schemas/type_survey:SurveyResponseQuestion"},"updated":{"type":"integer","description":"The date the answer was updated. Measured in seconds since the Unix epoch."}},"title":"SurveyResponseAnswer"},"type_survey:SurveyResponseData":{"type":"object","properties":{"answers":{"type":"array","items":{"$ref":"#/components/schemas/type_survey:SurveyResponseAnswer"},"description":"An array of answers from the survey response."},"created":{"type":"integer","description":"The time the survey response was created. Measured in seconds since the Unix epoch."},"id":{"type":"string","description":"The response ID. This is unique to the individual submission."},"survey_id":{"type":"string","description":"The ID of the survey that the response was submitted to."},"subscription":{"$ref":"#/components/schemas/type_subscription:SubscriptionData"},"updated":{"type":"integer","description":"The date the survey response was updated. Measured in seconds since the Unix epoch."}},"title":"SurveyResponseData"},"type_survey:SurveyResponse":{"type":"object","properties":{"uid":{"type":"string","description":"The prefixed event ID, unique to each webhook event."},"event_timestamp":{"type":"integer","description":"The date the event was created. Measured in seconds since the Unix epoch."},"event_type":{"type":"string","description":"The event type."},"data":{"$ref":"#/components/schemas/type_survey:SurveyResponseData"}},"title":"SurveyResponse"}}}}