Content Publishing API
Create and update tool pages, articles, feature pages, and model pages via the content webhook.
Content Publishing API
Create SEO-optimized pages programmatically. Used by Claude Code agents and automation scripts.
Endpoint
POST https://www.wireflow.ai/api/content/webhook
Authorization: Bearer YOUR_CONTENT_WEBHOOK_SECRET
Content-Type: application/json
The secret is the CONTENT_WEBHOOK_SECRET environment variable.
Content Types
| Type | URL Pattern | parentCategory |
|---|---|---|
TOOL |
/features/{slug} |
features |
FEATURE |
/features/{slug} |
features |
APP |
/features/{slug} |
features |
MODEL |
/models/{slug} |
models |
ARTICLE |
/blog/{slug} |
articles |
Create a Tool Page
curl -X POST https://www.wireflow.ai/api/content/webhook \
-H "Authorization: Bearer $CONTENT_WEBHOOK_SECRET" \
-H "Content-Type: application/json" \
-d '{
"event": "create_tool",
"type": "TOOL",
"slug": "ai-background-remover",
"title": "AI Background Remover",
"subtitle": "Remove backgrounds from any image instantly with AI",
"meta_description": "Free AI background remover. Upload an image and get a clean cutout in seconds.",
"seoKeywords": ["background remover", "remove background", "ai cutout"],
"heroImage": "https://cdn.wireflow.ai/tools/bg-remover-hero.jpg",
"c2aTitle": "Remove Backgrounds Now",
"c2aSubtitle": "Upload an image and get results in seconds",
"c2aButtonCopy": "Start Creating",
"c2aLink": "/workflows",
"isPublished": true,
"valueProps": [
{
"title": "Instant Results",
"description": "AI removes backgrounds in under 5 seconds"
},
{
"title": "No Signup Required",
"description": "Start using immediately, no account needed"
}
],
"faqSchema": [
{
"question": "How does the AI background remover work?",
"answer": "Our AI model detects the subject and cleanly separates it from the background."
}
],
"howToSteps": [
{
"title": "Upload your image",
"description": "Drag and drop or click to upload any image format"
},
{
"title": "AI processes automatically",
"description": "Background is detected and removed in seconds"
},
{
"title": "Download your result",
"description": "Get a transparent PNG ready for use"
}
]
}'
Create an Article
curl -X POST https://www.wireflow.ai/api/content/webhook \
-H "Authorization: Bearer $CONTENT_WEBHOOK_SECRET" \
-H "Content-Type: application/json" \
-d '{
"event": "create_article",
"type": "ARTICLE",
"slug": "guide-to-ai-video-generation",
"title": "Complete Guide to AI Video Generation in 2026",
"subtitle": "Everything you need to know about creating videos with AI",
"meta_description": "Learn how to generate professional videos using AI tools like Kling, Veo, and more.",
"body_markdown": "# Introduction\n\nAI video generation has...",
"seoKeywords": ["ai video generation", "kling video", "veo 3"],
"isPublished": true
}'
Create a Model Page
curl -X POST https://www.wireflow.ai/api/content/webhook \
-H "Authorization: Bearer $CONTENT_WEBHOOK_SECRET" \
-H "Content-Type: application/json" \
-d '{
"event": "create_model",
"type": "MODEL",
"slug": "kling-video-3",
"title": "Kling Video 3.0",
"subtitle": "High-quality AI video generation with motion control",
"meta_description": "Generate professional videos with Kling Video 3.0 AI model.",
"seoKeywords": ["kling video", "ai video model"],
"isPublished": true,
"workflowId": "clx1abc123"
}'
Update Existing Content
Use PUT with the same endpoint. Lookup is by slug.
curl -X PUT https://www.wireflow.ai/api/content/webhook \
-H "Authorization: Bearer $CONTENT_WEBHOOK_SECRET" \
-H "Content-Type: application/json" \
-d '{
"slug": "ai-background-remover",
"title": "AI Background Remover - Updated",
"isPublished": true,
"valueProps": [
{
"title": "Even Faster",
"description": "Now processes in under 2 seconds"
}
]
}'
All Fields Reference
Required (all types)
| Field | Type | Description |
|---|---|---|
slug |
string | URL slug (unique, lowercase, hyphens) |
title |
string | Page title (unique) |
Content Fields
| Field | Type | Description |
|---|---|---|
subtitle |
string | Subtitle (defaults to title) |
type |
enum | TOOL, FEATURE, APP, MODEL, ARTICLE |
body_markdown |
string | Markdown body (mainly for ARTICLE) |
heroImage |
string | Hero image URL |
isPublished |
boolean | Whether page is live (default: false) |
SEO Fields
| Field | Type | Description |
|---|---|---|
meta_description |
string | Meta description for search |
seoKeywords |
string[] | Target keywords |
canonicalUrl |
string | Canonical URL |
ogImage |
string | Open Graph image |
pillar |
string | Content pillar |
CTA Fields
| Field | Type | Description |
|---|---|---|
c2aTitle |
string | Call to action title |
c2aSubtitle |
string | CTA subtitle |
c2aButtonCopy |
string | Button text (default: "Start Creating") |
c2aLink |
string | Button link (default: "/workflows") |
Rich Content Fields
| Field | Type | Description |
|---|---|---|
valueProps |
array | [{ title, description, icon?, image? }] |
faqSchema |
array | [{ question, answer }] — generates FAQ schema markup |
howToSteps |
array | [{ title, description, image? }] |
contentBlocks |
array | Generic content blocks |
crossLinks |
array | [{ url, anchorText, description? }] |
quickAnswer |
object | { question, answer, bullets?, variant? } |
Linking Fields
| Field | Type | Description |
|---|---|---|
workflowId |
string | Link to a Wireflow workflow |
subcategory |
string | Page subcategory |
parentCategory |
string | Auto-derived from type. Override: features, articles, models |
Common Errors
| Status | Error | Fix |
|---|---|---|
| 401 | Invalid webhook secret | Check CONTENT_WEBHOOK_SECRET env var |
| 409 | Slug already exists | Use PUT to update, or pick a different slug |
| 500 | Unique constraint (title) | Each page title must be unique |
| 500 | No author available | Ensure [email protected] or [email protected] exists in DB |
Workflow Preview
When a page has workflowId set, a lightweight workflow preview automatically renders on the page. The preview shows a simplified visual of the workflow's nodes and connections — no ReactFlow dependency, just HTML/CSS/SVG.
How it works
- Feature/Model pages: The preview appears below the hero section, above the how-to steps and content blocks.
- Blog/Article pages: The preview appears after the article body, before the related posts section, with a "Try this workflow" heading.
- CTA button: Each preview includes an "Open this workflow" button that links to
/flow/{workflowId}.
Setting workflowId on a page
Include workflowId when creating or updating a page via the webhook:
curl -X POST https://www.wireflow.ai/api/content/webhook \
-H "Authorization: Bearer $CONTENT_WEBHOOK_SECRET" \
-H "Content-Type: application/json" \
-d '{
"event": "create_model",
"type": "MODEL",
"slug": "kling-video-3",
"title": "Kling Video 3.0",
"subtitle": "High-quality AI video generation",
"workflowId": "clx1abc123",
"isPublished": true
}'
The workflowId is the CUID of any workflow in the database. The workflow data is fetched server-side at render time for optimal page speed and SEO.
Components
Two components are available for custom integrations:
WorkflowPreviewServer— Server component, fetches from Prisma directly. Best for SEO pages.WorkflowPreview— Client component, fetches from/api/workflows/{id}/preview. Use for interactive contexts.
import { WorkflowPreviewServer } from '@/components/marketing/WorkflowPreviewServer';
// In a server component:
<WorkflowPreviewServer workflowId="clx1abc123" className="mt-8" />
Tips for Claude Code
- Always set
isPublished: trueif you want the page live immediately - Use
type: "TOOL"for tool/feature pages — parentCategory is auto-derived - Slugs should be lowercase with hyphens:
ai-background-remover - Include at least 3
faqSchemaentries for better SEO - Include at least 3
valuePropsfor the page layout to look complete - Set
workflowIdto link the page to a specific workflow template