API Integration

API Integration

Wonderblogs connects to your blog platform through two HTTP endpoints you provide: a Brand Context Endpoint and a Publish Endpoint.

How it works

When a run starts, Wonderblogs sends a GET request to your Brand Context Endpoint to fetch brand context (identity, audience, content focus, and writing instructions). Once the post is generated, Wonderblogs sends the result via POST to your Publish Endpoint for publication.

Both requests include your Target Authentication Key as a Bearer token in the Authorization header, so your backend can verify the caller.

Brand Context Endpoint contract

Your Brand Context Endpoint must respond to a GET request with a JSON object containing the brand context Wonderblogs needs. The response should include fields such as brand name, tagline, target audience, content pillars, and writing guidelines. See the API docs for the full schema.

Publish Endpoint contract

After content generation completes, Wonderblogs sends an HTTP POST to your Publish Endpoint with a JSON body that includes the Markdown content, SEO metadata (title, description, slug), tags, and an optional featured image URL. Your endpoint should return a 2xx status to confirm receipt.

Authentication

Every outbound request Wonderblogs makes carries your Target Authentication Key in the header: Authorization: Bearer YOUR_KEY. Validate this token on your side to ensure only Wonderblogs can call your endpoints.

You can manage this key in the API Keys > Target Authentication Key section on your site's Settings page.

Testing your integration

Use the Test button next to the Brand Context Endpoint field on the Settings page to verify your endpoint is reachable and returning the expected schema. For the Publish Endpoint, trigger a manual run and confirm the post arrives on your blog.

Wonderblogs API

You can also call the Wonderblogs API from your own systems to trigger blog post generation, image generation, and poll job status. Create API keys in the API Keys > Wonderblogs API Keys section on Settings. See the API docs for available endpoints and request/response schemas.

Error handling

If Wonderblogs cannot reach your Brand Context Endpoint or receives a non-2xx response, the run will fail and the error is recorded in the run log. Check the Runs page for detailed error messages and timestamps to help diagnose connectivity issues.