Webhooks
Receive article results automatically instead of polling.
How Webhooks Work
- Configure a webhook URL via the Publish Targets API or pass
webhook_urlper request - When an article generation job completes, blogAIzer POSTs the full result to your URL
- Your server receives the same payload as the GET status endpoint
Webhook Delivery
text
POST https://mybot.com/webhook/blogaizer
Authorization: Bearer {your_configured_auth_token}
Content-Type: application/json
X-BlogAIzer-Job-Id: job_abc123
X-BlogAIzer-Event: article.complete
Headers
| Header | Description |
|---|---|
Authorization |
The auth token you configured for this target |
Content-Type |
Always application/json |
X-BlogAIzer-Job-Id |
The job ID for this article |
X-BlogAIzer-Event |
Event type (currently article.complete) |
Payload
The webhook body is identical to the complete response from GET /v1/content/articles/{job_id}:
json
{
"job_id": "job_abc123",
"status": "complete",
"article": {
"title": "How AI Reduces ER Wait Times in 2026",
"html": "<article>...</article>",
"meta_title": "...",
"meta_description": "...",
"eeat_score": 44,
"word_count": 1523
},
"featured_image": {
"url": "https://storage.googleapis.com/...",
"alt_text": "..."
},
"social_posts": { "linkedin": [...], "x": [...] },
"credits_used": 1
}
Configuring Webhooks
Option 1: As a Publish Target (persistent)
bash
curl -X POST https://blogaizer.com/api/v1/config/publish-targets \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"brand_id": "brd_xyz",
"targets": [{
"type": "webhook",
"name": "My Bot",
"url": "https://mybot.com/webhook/blogaizer",
"auth_token": "Bearer my_secret"
}]
}'
Option 2: Per Request (one-time)
bash
curl -X POST https://blogaizer.com/api/v1/content/articles \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"topic": "AI in healthcare",
"webhook_url": "https://mybot.com/webhook/this-job"
}'
Retry Policy
If your webhook endpoint returns a non-2xx status:
- blogAIzer retries up to 3 times with exponential backoff (10s, 60s, 300s)
- After 3 failures, the result is still available via polling
- Check the job status endpoint to retrieve missed webhook deliveries
