Request
YALG sends a JSON payload with the generated article body in Markdown.2xx response marks delivery as successful. Non-2xx responses are treated as failures and may be retried.
Payload v1
Schema notes
eventis alwaysblog.post.finishedfor this version.versionidentifies this delivery contract. The initial value is2026-06-21.article.bodyMarkdownis the canonical article body.article.publication.statusis eitherdraftorpublished, based on the client’s YALG delivery settings.article.publication.publishedAtisnullfor drafts and an ISO timestamp when YALG requests immediate publication.source.articleVersionincrements when the YALG article is regenerated.
Receiver response
A receiver can return any2xx. Returning identifiers lets YALG store the client-side post reference.
Idempotency
Use theIdempotency-Key header as the unique delivery key. For a given YALG article version, repeated requests use the same key:
- Store the idempotency key with the created or updated client post.
- If the same key is received again, return the existing client post instead of creating a duplicate.
- If
source.articleVersionchanges, treat the request as a new version of the article and update or create according to your app’s content rules.
Security
- Require HTTPS for the receiver endpoint.
- Validate
x-api-keybefore reading or storing the payload. - Keep API keys server-side only and rotate them if they are exposed.
- Do not trust client-provided slugs blindly; normalize and de-duplicate them in your application.
- Log request IDs, status codes, and idempotency keys, but do not log API keys or full article bodies unless your compliance policy allows it.