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 →- 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.
- Can a Local LLM Replace Claude Code? The Benchmark Everyone Quotes Is the Wrong OneWhy SWE-bench misleads, and what actually breaks when a local model drives your coding agent.
- The September Cut Took 17% of My Claude Code Week. Subagents Took 48%455 sessions of logs show where a Claude Code week actually goes, and which saving tips work.