This is the pull-based integration. If you want YALG to push completed articles to your own endpoint, see Blog Delivery.
1. Create a Developer API key
- Sign in to YALG.
- Open
Settings > Developer. - Create a named API key for the site or environment that will read blog articles.
- Copy the full key immediately. It is shown once.
- Store it server-side, for example as
YALG_BLOG_API_KEY.
2. List blog articles
Public rendering filter
The list endpoint returns all blog article jobs for the key owner, including drafts, running jobs, failed jobs, and completed jobs. For a public blog, filter before rendering:statusshould beFINISHEDorPUBLISHED.languageshould match the current site locale, such asen,fr, ores.slugshould be present.articleTitleortopicshould be present.
3. Get one article with Markdown
Use the article id from the list response:articleMarkdown.
articleMarkdown can be null while an article is still running, blocked, or failed. Treat it as the canonical article body once the article is FINISHED or PUBLISHED.
Download raw Markdown
If you only need the article body as a Markdown file, use:text/markdown; charset=utf-8 and a Content-Disposition attachment filename based on the article topic. The endpoint returns an error if Markdown is not available yet.
4. Example server-side fetch
Headers
Common errors
Difference from Blog Delivery
There are two API keys involved in blog integrations:- Developer API key: created in
Settings > Developer, sent by your server to YALG asx-api-key, used forGET /v1/blog/articles. - Delivery API key: configured in YALG blog delivery settings, sent by YALG to your receiver endpoint as
x-api-keywhen YALG pushes an article to your app.