Webhook
Connect your website or automation to receive complete articles, images and metadata.
A webhook is a web address on your own website, or in an automation tool, that receives each finished article from outwrite.ai. Your site or automation then decides how to save and show it. Available in Simple and Pro.
What this is and who it's for
Use a webhook when your blog isn't on one of the platforms outwrite.ai connects to directly. For example:
- A custom-built website, or one made with an AI website builder. If you're building with Lovable or a similar tool, follow Lovable / AI agents: it gives you copy-and-paste prompts that build the receiving side for you.
- An automation tool such as Make, Zapier or n8n that passes the article on to another system.
Setting up the receiving side needs a developer, or someone comfortable building automations. If your blog runs on WordPress, Shopify, Wix, Ghost, Webflow or Framer, use that platform's guide instead. It's quicker.
Why it helps
- You can publish to almost any website, not just the platforms on the list.
- Each article arrives complete: HTML and Markdown, cover image, tags, search description and campaign details.
- A shared secret proves each article really came from outwrite.ai.
- You can add several named destinations per brand and pick one per campaign.
Before you start
- An HTTPS address that accepts POST requests (the receiver). It must be reachable on the public internet, with no port number or IP address in it.
- Somewhere on your server to store a secret safely (server settings or environment variables, never in browser code).
- An active outwrite.ai trial or subscription. Adding destinations costs no credits; normal article costs still apply.
Set it up
- Build a receiver that checks the secret and respects the draft flag (details under For developers).
- Open the integrations page. In Pro, go to Auto Blog → Integrations. In Simple, go to Publishing settings and select Connect or manage your website.
- Click the Webhook card, then Add destination.
- In Destination name, enter a name you'll recognize, such as "Company blog".
- In Webhook URL, paste your receiver's address.
- Leave Advanced settings as they are for a new receiver: Complete article · v2 with Authenticate deliveries turned on.
- Click Save connection.
- Click Copy secret and add it to your receiver's server settings. You'll see Secret copied. Add it to your receiver's server secrets.
- Click Test connection. A working receiver shows Connection accepted the test. No article was published.
- Choose the destination. In Pro, open Auto Blog → Campaigns, open your campaign, set Publishing destination to it and Save on website as to CMS draft for the first article. In Simple, open Publishing settings, set Where should your articles go? to it and Send articles to your CMS as to Drafts.
Your Workspace ID is shown at the bottom of the Webhook card, with a Copy button. It's also in the workspace menu at the top of the left sidebar. It's the brand_id your receiver should expect. It identifies the brand; it isn't a password.
Multiple destinations
Each brand can have several named webhook destinations, each with its own address and secret. A campaign sends each article to one destination, not to all of them. Other brands keep their own separate destinations.
- Make default suggests this destination for new campaigns. Existing campaigns keep their choice.
- Pause stops new articles going to this address. A request already on its way may still finish. Campaigns keep writing articles while the destination is paused; pause the campaign too if you want writing to stop. Pausing the default also clears its default status, so choose Make default again after resuming.
- Resume turns it back on. Waiting articles are then sent normally.
- Manage lets you rename the destination, test it, copy or rotate its secret, and change its Advanced settings.
- Remove retires the destination and keeps its history. You must first choose another destination in every campaign that uses it.
To change the address, add a new destination. Articles already sent stay linked to the old one. Renaming, pausing or choosing a default never changes the secret. Changing the article format or authentication does rotate it: update your receiver and reselect the destination in affected campaigns.
How to tell it's working
| What you see | What it means |
|---|---|
| Connection accepted the test. No article was published. | Your receiver answered the test with a success code. It doesn't prove that articles are saved or shown. |
| Received, awaiting confirmation | Your receiver accepted the article but didn't send back a confirmation (a plain success reply). |
| Saved on website as draft | Your receiver confirmed it stored a private draft. |
| Publication verified | Your receiver confirmed publication, and outwrite.ai found the article's marker on the public page. |
A plain "200 OK" counts as received, not published. To reach Saved on website as draft or Publication verified, your receiver must return a confirmation, described below. See the full status table.
Common errors and fixes
| What you see | What to do |
|---|---|
| The website did not accept the connection test (HTTP 401) or (HTTP 403) | The receiver rejected the secret. Copy the secret again and check the X-Outwrite-Secret header. |
| The website did not accept the connection test (HTTP 404) | The address path is wrong, or the receiver isn't deployed. |
| The website did not accept the connection test (HTTP 500) or another 5xx code | The receiver crashed. Check its logs. |
| Use your website's public https:// address, without a port number or IP address. | The address isn't plain https://, or includes a port number or IP address. |
| The website must resolve only to public addresses. | The receiver is on a private network. |
| Please wait before testing the connection again. | You can run five tests every 15 minutes. |
| This webhook destination is paused. Resume it in Integrations before publishing to it. | Click Resume on the destination. |
| This webhook destination was removed. | Choose another destination in the campaign. |
| Choose another destination in campaigns and publishing settings that use this connection before removing it. | Move those campaigns to another destination first. |
| A destination with this name already exists. Choose a different name. | Use a unique name. |
| This destination keeps its original URL. Add a new destination for the new endpoint. | Click Add destination for the new address. |
| The CMS rejected this request or The CMS rejected its credentials or permissions. (on an article) | Your receiver refused the article with an error code such as 400, 401, 403 or 422. Fix the receiver or its secret, then open the article and select Return to review. |
For developers
Complete article payload · v2
New destinations use Complete article · v2. Each article arrives as a JSON POST with an X-Outwrite-Secret header (when authentication is on) and an Idempotency-Key header.
{
"schema_version": 2,
"id": "stable-article-uuid",
"brand_id": "brand-workspace-uuid",
"content_id": "generated-content-uuid",
"title": "How to evaluate your next tool",
"slug": "evaluate-your-next-tool-a1b2c3d4",
"content": "<h2>Compare your options</h2><p>Article HTML.</p>",
"content_markdown": "## Compare your options\n\nArticle HTML.",
"tags": ["Software", "Buying guides"],
"excerpt": "Article HTML.",
"metadescription": "A practical guide to choosing a tool for your team.",
"meta_description": "A practical guide to choosing a tool for your team.",
"thumbnail": "https://images.pexels.com/photos/example.jpeg",
"thumbnail_alt_text": "A team comparing options",
"featured_image_url": "https://images.pexels.com/photos/example.jpeg",
"featured_image_alt": "A team comparing options",
"featured_image_credit": {"name": "Photographer", "url": "https://www.pexels.com/@photographer/", "source_url": "https://www.pexels.com/photo/example/"},
"keyword_seed": "how to choose business software",
"language_code": "en",
"campaign_id": "campaign-uuid",
"campaign_name": "Weekly buying guides",
"batch_id": "batch-uuid",
"publisher_name": "Your business",
"publisher_url": "https://yourwebsite.com",
"publisher_logo_url": null,
"author": null,
"author_url": null,
"author_bio": null,
"created_at": "2026-10-31T10:00:00Z",
"updated_at": "2026-10-31T10:30:00Z",
"content_type": "raw",
"source": "outwrite.ai",
"is_draft": true,
"operation_id": "unique-delivery-uuid",
"revision": 1,
"admitted_at": "2026-10-31T11:00:00Z",
"published_at": null,
"word_count": 1200
}
Values above are examples, not a real article. Notes:
- Optional metadata is
nullwhen unavailable, andtagscan be empty.campaign_idandbatch_idare null for articles created outside a campaign.authoris always null. Nothing is invented. tagscome from the article's saved keywords.meta_descriptionis the saved search description when it matches the current text; otherwise it's a short excerpt.thumbnailandfeatured_image_urlare the same value, as are the two alt fields and the two description fields.contentstarts with the article title as an<h1>, and ends with the photo credit when there's a cover.content_markdownis made from that same HTML; tables stay as HTML to keep their structure. Sanitize either one before rendering.ididentifies the article across revisions;operation_ididentifies one send. Upsert byidand skip repeats byoperation_id. Keep the first public slug when an article is updated. Store a draft revision of a live article separately, without replacing the live version.admitted_atis when the send was prepared.published_atis null for drafts and the requested publication time for live sends. It isn't proof that the page is live.- The connection test sends the same shape with
is_test: trueandis_draft: true. Return success without storing anything.
Older formats
Destinations saved before v2 stay on Legacy · existing automations, and their payloads don't change. The legacy payload has title, content, slug, excerpt, featured_image_url, featured_image_alt, featured_image_credit, is_draft, operation_id, revision, content_id and word_count, with meta_description and author fields set to null. Upgrade under Advanced settings only after adapting your receiver to v2; the secret rotates when you do. The Webflow webhook path always uses the legacy shape.
Confirm what you stored
A plain 2xx response means received, not published. After committing the exact article to storage, return a receipt:
{
"operation_id": "the-original-delivery-uuid",
"revision": 1,
"content_hash": "64-character-lowercase-sha256-hex",
"remote_id": "the-stable-article-id",
"status": "remote_draft"
}
Calculate the hash from the exact stored title, one null byte, and the exact stored HTML (including the photo credit):
import { createHash } from "node:crypto";
const contentHash = createHash("sha256")
.update(`${stored.title}\0${stored.content}`)
.digest("hex");
For a live article, use status: "published" and add the absolute public url. The public page's initial HTML must contain this marker:
<meta name="outwrite-article" content="ARTICLE_ID:REVISION:CONTENT_HASH">
Render the marker only on the matching saved live article. A page that only loads its content with JavaScript can't be verified. Drafts use remote_draft and no public URL.
Confirming later
If your workflow finishes asynchronously, each article also includes publication_receipt with a callback url, a token for that one send, and authorization: "Bearer". POST the same receipt JSON to that URL with Authorization: Bearer <token>. Tokens expire seven days after the article was prepared, and callback bodies must stay under 8 KB. Never store the token in public article data. Test requests have no token. A 409 response from the callback means verification failed; it doesn't ask you to send anything again.
An unclear response is not permission to create a second article. Check your stored records first. The reference receiver returns the same receipt for an identical repeat, rejects conflicting or older revisions before changing content, and keeps drafts private.
Read articles through MCP or the account API
- MCP: call
outwrite_list_workspaces, thenoutwrite_get_articlewithworkspaceId,articleId,sections: ["content", "metadata"]andformat: "html"or"markdown". Pinrevisionwhen paging withnextOffset. Only workspaces you've granted are available. See Connect your AI assistant. - Signed-in account API:
POST /api/article-exportwith an outwrite.ai user session bearer token and{ "brandId": "…", "articleId": "…", "revision": 1 }. The response'sdataholds the full export in both formats, with metadata.revisionis optional and defaults to the current saved one. This route only accepts a signed-in user session, not an MCP token or a public key. Never put an owner's token in a public site.
Exports are read-only and contain no secret, callback token or private research notes. Reading an export doesn't publish anything.
Common questions
Do I need to build this myself?
Someone does. If you use Lovable or another AI coding tool, the Lovable / AI agents prompts build it for you. With Make, Zapier or n8n, start the scenario with an incoming webhook.
Can one article go to two websites?
No. Each campaign sends to one destination. Create a second campaign for a second site.
If I change a campaign's destination, do old articles move?
No. Articles already sent stay on the site they went to.
Can outwrite.ai update an article on my site after it's published?
Update live post doesn't support webhooks, so edit the article on your site. If outwrite.ai ever sends a newer revision of the same article, your receiver should update it in place and keep its original address.