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:
Endpoint must accept a
POST
requestEndpoint must return a
200
responseEndpoint 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 |
| The ID of the article |
| The time the article was created. Formatted as ISO 8601 |
| The time the article was last updated. Formatted as ISO 8601 |
| The time the article was last generated. Formatted as ISO 8601 |
| The time the article was last published. Formatted as ISO 8601 |
| The title of the article |
| The keyword of the article |
| The excerpt of the article |
| The meta description of the article |
| The URL of the hero image for the article |
| The body of the article, formatted as Markdown |
| The body of the article, formatted as HTML |
| 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": "..."
}