Skip to main content

Setting up Webhook integration

Publish articles directly to any URL

Joshua Russell-Ahern avatar
Written by Joshua Russell-Ahern
Updated over 8 months ago

Webhooks are used when your website is custom built, so no native integrations would be suitable. Common examples include sites built using static site generators, or custom frameworks like Next.js.

How to setup

In this guide, we'll show you how to setup a webhook with Macaw allowing you to publish your articles to any endpoint of your choosing.

1) Creating your webhook

The specific details of how to create a webhook will differ depending on whatever platform your website is built using but it must follow the following:

  1. Endpoint must accept a POST request

  2. Endpoint must return a 200 response

  3. Endpoint can accept custom headers if required for authorization or any other custom functionality

For details on the shape of the response that Macaw will send to your endpoint, view the response details below.

2) Connect to your webhook

Head to your publishing connections setup in Macaw and click Connect for the Webhook connection.

Add the URL to your endpoint you created in step 1 to the Webhook URL input

If your endpoint requires any custom headers, add them in the next section

Once you are done configuring the webhook, click "Connect"

Done! Your endpoint should now be receiving articles whenever you publish them from Macaw.

Response

Property

Description

id

The ID of the article

createdAt

The time the article was created. Formatted as ISO 8601

updatedAt

The time the article was last updated. Formatted as ISO 8601

generatedAt

The time the article was last generated. Formatted as ISO 8601

publishedAt

The time the article was last published. Formatted as ISO 8601

title

The title of the article

keyword

The keyword of the article

excerpt

The excerpt of the article

metaDescription

The meta description of the article

heroImage

The URL of the hero image for the article

body

The body of the article, formatted as Markdown

bodyHtml

The body of the article, formatted as HTML

bodyText

The body of the article, with no formatting

Example response:

{
"id": "a5d49e2c-7561-4715-8bd9-4c0ebcaa3f09",
"createdAt": "2024-09-11T12:35:01.685Z",
"updatedAt": "2024-09-27T06:52:45.109Z",
"generatedAt": "2024-09-13T05:52:31.656Z",
"publishedAt": "2024-09-27T06:52:45.108Z",
"title": "Automated Content Generation Guide for Beginners",
"keyword": "automated content generation",
"excerpt": "Unlock the potential of automated content generation! Discover how AI streamlines content creation, maintaining brand consistency while boosting SEO and efficiency.",
"metaDescription": "Learn the essentials of automated content generation and how it can save time, boost efficiency, and maintain a consistent brand voice.",
"heroImage": "http://app.macawhq.com/images/334b590b-8c0a-47ee-af87-fd84e3ea7d3d",
"body": "...",
"bodyHtml": "...",
"bodyText": "..."
}
Did this answer your question?