What this does
Connect Soogle to your website/CMS by creating one webhook endpoint that receives AI-generated articles and publishes them automatically.
Requirements
Your endpoint must:
Method: POST
Content-Type: application/json
Auth: Bearer token via Authorization header
Example: Authorization: Bearer <SOOGLE_SECRET_KEY>
Return: HTTP 200β299 on success
Recommended endpoint path:
/api/webhook/blog/publish
{
"title": "Article Title",
"content": "<p>Full HTML content of the article...</p>",
"excerpt": "Short description or excerpt",
"featuredImage": "https://cdn.example.com/image.jpg",
"category": "Technology",
"tags": ["AI", "Automation", "SEO"],
"author": { "name": "John Doe", "email": "[email protected]" },
"publishedAt": "2024-01-15T10:30:00Z",
"metaTitle": "SEO optimized title",
"metaDescription": "SEO optimized description",
"slug": "article-url-slug",
"test": false
}
Test webhooks
When you click βTestβ in Soogle, the payload includes:
{ "test": true }
Responses Soogle expects
β Success (HTTP 200β299)
{
"success": true,
"message": "Article published successfully",
"id": "123",
"url": "https://your-site.com/blog/article-url-slug"
}
β Error (HTTP 400β499)
{
"success": false,
"message": "Error description"
}Important: For success, both must indicate success:
HTTP status code 200β299
Response body (if present) should also reflect success
Configure inside Soogle
Go to Soogle Dashboard β Integrations β Custom API
Add your Webhook URL
Click Generate to create your Secret Key
Save it as an environment variable on your server
Click Test β then Save & Activate
Environment variable
SOOGLE_SECRET_KEY=whsec_YOUR_SECRET_KEY
Quick test with curl
curl -X POST https://your-site.com/api/webhook/blog/publish \
-H "Authorization: Bearer whsec_YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"test": true,
"title": "Test Article",
"content": "<p>Test content</p>",
"excerpt": "Test excerpt"
}'
Common issues
Invalid authentication token
Ensure the header is exactly Authorization: Bearer <token>
Confirm your server loaded SOOGLE_SECRET_KEY correctly
Copy/paste the key from Soogle (no extra spaces)
Connection timeout
Endpoint must be publicly reachable
Use HTTPS in production
If testing locally, expose with a tunnel (ngrok, etc.)
Test works but real articles fail
Your CMS/database publish logic is failing
Ensure you handle required fields like title + content
Check server logs for the exact error
