API/Webhook + AymarTech

Send AI-generated articles to your own endpoint automatically or after approval using signed webhook deliveries.

API/Webhook is for custom websites and unsupported CMS stacks. Your site can pull approved or auto-published articles from AymarTech with an API key and receive webhook notifications when article state changes.

Who this is for

Use this when you control the codebase, want custom rendering, or need AymarTech to notify your backend with either automatic delivery or confirmation before article data is exposed.

Fields and payload

Payload AymarTech exposes published articles through the Publishing API and can send article_published, article_updated, and article_unpublished webhooks. Webhook payloads include event, article id, slug, headline, published state, and updatedAt; API article responses include article content and metadata for rendering.

How to connect in the dashboard

All connection forms, OAuth buttons, target pickers, publish-mode settings, and test actions are inside the AymarTech dashboard. Choose automatic publishing or require confirmation before go-live.

Open dashboard integrations →
  1. Open the project in AymarTech and go to the publishing/API settings in the dashboard.
  2. Generate an API key for the project.
  3. Set BLOG_WRITER_BASE_URL to the project's publish API base URL and BLOG_WRITER_API_KEY to the generated key in your website environment.
  4. Use GET /articles for article lists, GET /articles?slug=... for article pages, and GET /sitemap for dynamic sitemap generation.
  5. Choose automatic delivery or confirmation before article data is exposed, and optionally add a webhook URL and secret for cache revalidation or downstream workflows.
  6. Send a test webhook from the dashboard and confirm your endpoint returns a 2xx response.

How article publishing or delivery works

  • The Publishing API returns only approved or auto-published article data for the project associated with the API key.
  • Webhooks are sent after approval or auto-publish on article_published, article_updated, and article_unpublished events.
  • If a webhook secret is configured, AymarTech sends both X-Webhook-Signature and X-Webhook-Secret headers.
  • Webhook signatures are HMAC-SHA256 over the JSON payload body.
  • Your site remains responsible for rendering HTML, SEO metadata, canonical URLs, hreflang, and cache invalidation.

Troubleshooting

  • 401 from the Publishing API: confirm the API key is present in X-API-Key or Authorization: Bearer.
  • No articles returned: confirm the articles are approved or auto-published in AymarTech and the project ID/base URL is correct.
  • Webhook signature mismatch: verify that your server computes HMAC over the exact raw JSON body using the saved secret.
  • Webhook timeout: acknowledge quickly with 2xx and move heavy processing to a queue.
  • Sitemap stale: generate it dynamically or revalidate it when article_published webhooks arrive.

Frequently asked

Can API/Webhook delivery be automatic?

Yes. You choose the mode: deliver or expose article data automatically when it is ready, or require confirmation first. Your website or backend still decides how to render or store the content.

What endpoints do I need?

Most sites use /articles for lists, /articles?slug=... for detail pages, and /sitemap for SEO discovery.

Are webhooks required?

No. They are optional, but useful for cache revalidation and downstream workflows.

How should I verify webhooks?

Use X-Webhook-Signature with your shared secret. X-Webhook-Secret is also sent when configured for simpler validation.

Where are the exact API values?

The dashboard shows the project API key, publish API base URL, webhook URL field, secret field, and test actions.

Related