Feed Control's webhooks are for developers who want their applications to process new feed items as they're detected by Feed Control.
Instead of polling feeds and checking for new items in your application, you can set up a webhook handler to receive new feed items as soon as they're processed by Feed Control. Webhooks are also great for serverless setups.
Webhook request format
Webhooks are sent as HTTP POST requests to to your webhook URL. The POST requests will have a
Here's an example of what Feed Control will send to your webhook handler:
Webhook response handling
Your server should respond within 15 seconds with a HTTP 200 status code to indicate success. Anything else (including no response within 15 seconds) will be treated as a failure and queued for further attempts. Feed Control will retry failed webhook requests every 30 minutes. If a request fails 10 times, it will not be retried.
Feed Control sends the following information in the JSON object of its webhooks:
|id||Feed item ID in the Feed Control database. Each item will have a unique item ID.|
|created_at||The date and time (UTC) that Feed Control detected and added the item to its database.|
|author||The author field value in the source feed|
|date||The date and time associated with the feed item (if present in the source feed)|
|guid||Item GUID found in the source feed, or one generated based on item URL or title.|
|content||Original item content (possibly HTML).|
|content_clean_html||Based on content above. Feed Control's stripped-down, sanitized version that can be displayed in web apps.|
|content_plain_text||A plain text version of the content.|
|feed||JSON object representing the feed the item belongs to (see below).|
|id||Feed ID in the Feed Control database. If you enable webhooks for multiple feeds, you can use this to determine the feed.|
|created_at||Date and time the feed was added to Feed Control.|
|updated_at||Date and time the feed was last edited in Feed Control.|
|name||The name you have given the feed (e.g. 'ABC Feed mentioning XYZ').|
|title||The original or edited feed title (if you enable RSS/JSON generation, this will be used in the output as the feed title).|
|url||The source feed URL.|
|feed_fetched_at||Date and time the source feed was last checked for new items.|
|update_frequency||How frequently the feed is checked for new items, in minutes. A value of 60 means the feed is checked every hour.|
|description||The original or edited feed description (if you enable RSS/JSON generation, this will be used in the output as the feed description).|
|generated_rss_url||If RSS generation has been enabled for the feed, the URL where you can access the generated RSS. Null otherwise.|
|generated_json_url||If JSON generation has been enabled for the feed, the URL where you can access the generated JSON. Null otherwise.|
Each item will contain three versions of the content: original ('content'); safe to display, stripped-down version ('content_clean_html'); plain text ('content_plain_text'). If the full article content is not included in the original feed, enable 'fetch full text' when adding a feed and Feed Control will attempt to retrieve the full content and send it along.
Note on generated RSS/JSON files: If you've enabled these, you may receive the webhook before Feed Control has been able to update these. So if you pull in the RSS/JSON in your handler, it might not yet contain the item you're processing.