Webhooks
If you're technical and wish to receive notifications for events related to your podcast, you can configure webhooks. If you're building a third party application, you can use webhooks to receive updates about your users' podcasts hosted on Pinecast.
Webhooks are available as part of the Notifications feature that's available with our Crew Add-on.
Webhook format
Pinecast will POST a JSON blob to the URL provided in the podcast settings dashboard. Pinecast waits up to 15 seconds for your server to answer. Failed webhooks are not retried, and Pinecast does not look at the status code of your answer.
Body
link is a full address. podcast.url , podcast.feed_url , and the episode url , listen_url , and player_url are paths that start with a slash: add https://pinecast.com in front of them.
The following fields are available on the JSON body (where foo.bar represents the field bar nested within an object on the field foo ):
summary: A text summary of the notification. It starts with the podcast's name in square brackets. E.g.,[My Podcast] $5.00 subscription from test-tipper@pinecast.comlink: The URL associated with the webhook. This generally links to the Pinecast podcast or episode dashboard associated with the event.podcast: A hash containing information about the podcast associated with the webhook.podcast.name: The name of the podcast.podcast.slug: The slug of the podcast. This can be used to format URLs.podcast.url: The URL of the podcast dashboard.podcast.feed_url: The URL of the podcast's RSS feed.type: The name of the webhook's trigger. This is one oftip,feedback,first_listen,listen_threshold,published,growth_milestone, orreview.
If type is tip , the following fields are available:
tipper: Email address of the listener that left a tip.currency: The lowercase ISO 4217 code of the currency the listener paid in, such asusdoreur.amount: Value of the tip, in the minor units ofcurrency— cents forusd, for example. Read it together withcurrency: the same number means a different amount of money in a different currency.
If type is feedback, the following fields are available:
-
episode: A hash containing information about the associated episode, if the feedback is about an episode. -
content: The contents of the feedback.
If type is review (a new review on Apple Podcasts or Podchaser, or a new comment on a linked YouTube podcast), the following fields are available:
-
service: Where the review was left. One ofapple,podchaser, oryoutube. -
rating: The rating, as a number. This isnullfor a YouTube comment, which has no rating. -
title: The title of the review, ornull. For a YouTube comment, this is the title of the episode. -
body: The text of the review or comment.
If type is first_listen or published , the following fields are available:
episode: A hash containing information about the episode that received its first listen.
If type is listen_threshold , the following fields are available:
episode: A hash containing information about the episode that crossed the listen threshold.threshold: The integer threshold that was crossed.
If type is growth_milestone , the following fields are available:
listens: The number of listens that the podcast has received so far.milestone: The number of listens that the podcast exceeded in order to cross the threshold.
Episode hashes contain the following fields:
id: The UUID associated with the episode.title: The episode title.url: The URL of the episode in the podcast dashboard.listen_url: A URL that redirects to the episode audio file. Accessing this URL will count a listen with the source "direct".player_url: The URL of the episode's embeddable player. In order to use this, you must manually format the<iframe>tag for the player's HTML source. Be sure to add athemequery string parameter and height.publish: An ISO 8601-formatted date denoting when the episode was published.
Redirects
This applies to webhook, Slack, and Discord destinations. Pinecast follows up to 5 redirects. Pinecast follows accepted web standards, so 301, 302, and 303 redirects turn the POST into a GET without the body. Give Pinecast the final address to avoid this.