Command Palette

Search for a command to run...

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.

How to Publish Posts via the dev.to API

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.

← Back to Resources