Webhooks
You can have Journalist AI send a POST
request to your website every time a publication is created.
- The Secret that you write on your integration will correspond to the value of the
X-SECRET
header. Use it for validation. - You should return status 200 and an optional JSON body with
{ url: string }
if you care about passing a generated URL to Journalist AI. It will use this URL and attach it to the corresponding Publication, and also use it for the Indexer.
The payload of the request looks like this:
{
"id": "12345", // This is a unique ID for the article
"title": "Sample Title",
"content": "<h2>example</h2><p>This is a sample content for demonstration purposes</p>",
"content_markdown": "##example\nThis is a sample content for demonstration purposes",
"thumbnail": "https://example.com/sample-thumbnail.jpg",
"thumbnail_alt_text": "Sample thumbnail description",
"metadescription": "This is a sample meta description for SEO purposes.",
"keyword_seed": "focus keyword"
"language_code": "en"
}
A typical HTTP response from your Webhook looks like this:
// 200
{
"url": "https://example.com/blog/my-blog-post" // This is optional
}
We don't retry failed Webhook calls
At the moment, all failed publications are not retried. Since Webhooks are tied with Publications, this means that if your Webhook fails, it won't be called again.
Updated about 1 month ago