How to Publish Posts via the dev.to API
Publish to dev.to from a curl command or a Python script, front matter and images included.

About How to Publish Posts via the dev.to API
A short, practical guide to publishing on dev.to without the editor. It starts with the raw curl request (POST /api/articles with an api-key header) so you see exactly what the API expects, then moves to a Python script that reads your Markdown front matter for the title and tags.
Why it is worth reading: it covers the part that trips people up, images, and the safe default: posts go up as drafts unless you set published to true, so you can check formatting first. A good building block if an agent writes your posts and you want a one-command cross-post.
The facts
- Type
- Guides
- Tags
- ContentAutomationAPI
- Listed
- October 26, 2026
More Guides
See all →- Agent Skills Drift: A Feedback Loop for Keeping One TrueAgent skills go stale in six ways while their checks stay green. A step-by-step loop to catch it.
- Four Ways a Test Can Lie to YouWhat 530 agent-written tests taught one developer: checks can be green, or red, and mean nothing.
- Headless Content Marketing: A New (Old) Strategy for SearchAhrefs on pages written mainly for AI answers, why big brands are making them, and what it means.
- Persistent Agent Teams With Herdr, Claude Code and PiRecreate always-on agent teams on your own VM: named peers that remember the project and talk.
- Building Better Agents Through End-to-End EvalsHow Ramp Stack grades a bookkeeping agent: messy synthetic worlds, rubrics and skill ablation.