A Forem API test: publish, edit, unpublish (2026-10-18)
This is a short test note about the Forem API v1. It was drafted with AI assistance and checked by a person before it was published.
What this post checks
An article can be created as a draft, edited, published and set back to draft through the API with the author's own key.
A minimal request
curl -X POST https://dev.to/api/articles \ -H "api-key: $DEV_API_KEY" \ -H "accept: application/vnd.forem.api-v1+json" \ -H "content-type: application/json" \ -d '{"article":{"title":"Hello","body_markdown":"Hello","published":false}}' The post is set back to draft after the test.
This paragraph was added by an edit made through the API.
原文:https://www.a8q9.cn/en/article/a-forem-api-test-publish-edit-unpublish-2026-10-18-b89c39.html