articles
Publish article
Changed onThis endpoint allows the client to create a new article.
"Articles" are all the posts that users create on DEV/Forem that typically show up in the feed. They can be a blog post, a discussion question, a help thread etc. but are referred to as articles within the code.
Body Parameter Tips:
- title: A compelling and descriptive title for the article.
- body_markdown: The main text of the article in Markdown format. You can use standard Markdown as well as Forem-specific Liquid tags (e.g., {% embed ... %}). You can also include YAML front matter at the very beginning of the markdown to specify metadata such as tags, series, and cover image.
- published: Set to true to immediately publish the article and make it visible in feeds. Set to false (default) to save it as a draft.
- tags: An array of up to 4 tag strings, e.g. ['ruby', 'rails']. Tags help categorize your post and improve discoverability.
- series: Group articles together by specifying a series name. If the series does not exist, it will be created.
- main_image: Absolute URL of the cover image for the article. Use POST /api/images to upload an image, or POST /api/images/generate to generate one, and get back a URL to use here or in body_markdown.
- canonical_url: If this post was originally published elsewhere, specify the canonical URL to maintain SEO integrity.
- description: A short summary of the article used for previews and SEO meta description.
- ai_disclosure_level: AI tooling usage disclosure (not_disclosed, no_ai, some_ai, fully_autonomous).
post/api/articles
Request
- Base URLhttps://dev.to
- Auth
- API key in header api-key
- or HTTP bearer
Request body
Response
An Article
Changes
- breaking
the
/request property type changed fromstringtoarray
- breaking
- info
added the new optional request property
/
- info