DEV Community articles API
The articles API from DEV Community — 22 operation(s) for articles.
The articles API from DEV Community — 22 operation(s) for articles.
openapi: 3.0.3
info:
title: Forem API V1 agent_sessions articles API
version: 1.0.0
description: "Access Forem articles, users and other resources via API.\n For a real-world example of Forem in action, check out [DEV](https://www.dev.to).\n All endpoints can be accessed with the 'api-key' header and a accept header, but\n some of them are accessible publicly without authentication.\n\n Dates and date times, unless otherwise specified, must be in\n the [RFC 3339](https://tools.ietf.org/html/rfc3339) format."
servers:
- url: https://dev.to/api
description: Production server
security:
- api-key: []
tags:
- name: articles
paths:
/api/articles:
post:
summary: Publish article
tags:
- articles
description: 'This endpoint allows the client to create a new article.
"Articles" are all the posts that users create on DEV that typically show up in the feed. They can be a blog post, a discussion question, a help thread etc. but is referred to as article within the code.'
operationId: createArticle
parameters: []
responses:
'201':
description: An Article
content:
application/json:
example:
type_of: article
id: 2233
title: New article
description: New post example
readable_publish_date: May 28
slug: new-article-2gaj
path: /username8/new-article-2gaj
url: http://forem.test/username8/new-article-2gaj
comments_count: 0
public_reactions_count: 0
collection_id: 13
published_timestamp: '2026-05-28T18:45:16Z'
language: en
subforem_id: null
positive_reactions_count: 0
cover_image: https://thepracticaldev.s3.amazonaws.com/i/5wfo25724gzgk5e5j50g.jpg
social_image: https://thepracticaldev.s3.amazonaws.com/i/5wfo25724gzgk5e5j50g.jpg
canonical_url: https://dev.to/fdocr/headless-chrome-dual-mode-tests-for-ruby-on-rails-4p6g
created_at: '2026-05-28T18:45:16Z'
edited_at: null
crossposted_at: null
published_at: '2026-05-28T18:45:16Z'
last_comment_at: '2026-05-28T18:45:16Z'
reading_time_minutes: 1
tag_list: ''
tags: []
body_html: '<p><strong>New</strong> body for the article</p>
'
body_markdown: '**New** body for the article'
user:
name: Delorse "Duncan" \:/ Kerluke
username: username8
twitter_username: twitter8
github_username: github8
user_id: 4056
website_url: null
profile_image: /uploads/user/profile_image/4056/149b80c3-1a8e-4e1f-ac70-9da821c6eb8a.jpeg
profile_image_90: /uploads/user/profile_image/4056/149b80c3-1a8e-4e1f-ac70-9da821c6eb8a.jpeg
'401':
description: Unauthorized
content:
application/json:
example:
error: unauthorized
status: 401
'422':
description: Unprocessable Entity
content:
application/json:
example:
error: 'param is missing or the value is empty: article'
status: 422
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Article'
get:
summary: Published articles
security: []
tags:
- articles
description: 'This endpoint allows the client to retrieve a list of articles.
"Articles" are all the posts that users create on DEV that typically
show up in the feed. They can be a blog post, a discussion question,
a help thread etc. but is referred to as article within the code.
By default it will return featured, published articles ordered
by descending popularity.
It supports pagination, each page will contain `30` articles by default.'
operationId: getArticles
parameters:
- $ref: '#/components/parameters/pageParam'
- $ref: '#/components/parameters/perPageParam30to1000'
- name: tag
in: query
required: false
description: 'Using this parameter will retrieve articles that contain the requested tag. Articles
will be ordered by descending popularity.This parameter can be used in conjuction with `top`.'
schema:
type: string
example: discuss
- name: tags
in: query
required: false
description: 'Using this parameter will retrieve articles with any of the comma-separated tags.
Articles will be ordered by descending popularity.'
schema:
type: string
example: javascript, css
- name: tags_exclude
in: query
required: false
description: 'Using this parameter will retrieve articles that do _not_ contain _any_
of comma-separated tags. Articles will be ordered by descending popularity.'
schema:
type: string
example: node, java
- name: username
in: query
required: false
description: "Using this parameter will retrieve articles belonging\n to a User or Organization ordered by descending publication date.\n If `state=all` the number of items returned will be `1000` instead of the default `30`.\n This parameter can be used in conjuction with `state`."
schema:
type: string
example: ben
- name: state
in: query
required: false
description: "Using this parameter will allow the client to check which articles are fresh or rising.\n If `state=fresh` the server will return fresh articles.\n If `state=rising` the server will return rising articles.\n This param can be used in conjuction with `username`, only if set to `all`."
schema:
type: string
enum:
- fresh
- rising
- all
example: fresh
- name: top
in: query
required: false
description: 'Using this parameter will allow the client to return the most popular articles
in the last `N` days.
`top` indicates the number of days since publication of the articles returned.
This param can be used in conjuction with `tag`.'
schema:
type: integer
format: int32
minimum: 1
example: 2
- name: collection_id
in: query
required: false
description: 'Adding this will allow the client to return the list of articles
belonging to the requested collection, ordered by ascending publication date.'
schema:
type: integer
format: int32
example: 99
responses:
'200':
description: A List of Articles
content:
application/json:
example:
- type_of: article
id: 2236
title: The Golden Apples of the Sun4
description: Banh mi vegan fingerstache. Craft beer wes anderson portland you probably havent heard of them swag....
readable_publish_date: May 28
slug: the-golden-apples-of-the-sun4-453o
path: /username12/the-golden-apples-of-the-sun4-453o
url: http://forem.test/username12/the-golden-apples-of-the-sun4-453o
comments_count: 0
public_reactions_count: 0
collection_id: null
published_timestamp: '2026-05-28T18:45:16Z'
language: en
subforem_id: null
positive_reactions_count: 0
cover_image: http://forem.test/assets/30-08b2d52669e0680784f50291966e33f77cbee815907e6abbacf74018fa3f3567.png
social_image: http://forem.test/assets/30-08b2d52669e0680784f50291966e33f77cbee815907e6abbacf74018fa3f3567.png
canonical_url: http://forem.test/username12/the-golden-apples-of-the-sun4-453o
created_at: '2026-05-28T18:45:16Z'
edited_at: null
crossposted_at: null
published_at: '2026-05-28T18:45:16Z'
last_comment_at: '2026-05-28T18:45:16Z'
reading_time_minutes: 1
tag_list:
- discuss
tags: discuss
user:
name: Joan "Stormy" \:/ Nienow
username: username12
twitter_username: twitter12
github_username: github12
user_id: 4060
website_url: null
profile_image: /uploads/user/profile_image/4060/aaa06fa2-d0f3-40cf-9578-bc53c1ca69e3.jpeg
profile_image_90: /uploads/user/profile_image/4060/aaa06fa2-d0f3-40cf-9578-bc53c1ca69e3.jpeg
organization:
name: Bergnaum Inc
username: org4
slug: org4
profile_image: /uploads/organization/profile_image/560/319c0831-b2a0-4bc1-a40b-bd5fdae4ce68.png
profile_image_90: /uploads/organization/profile_image/560/319c0831-b2a0-4bc1-a40b-bd5fdae4ce68.png
flare_tag:
name: discuss
bg_color_hex: '#000000'
text_color_hex: '#ffffff'
schema:
type: array
items:
$ref: '#/components/schemas/ArticleIndex'
/api/articles/latest:
get:
summary: Published articles sorted by published date
security: []
tags:
- articles
description: 'This endpoint allows the client to retrieve a list of articles. ordered by descending publish date.
It supports pagination, each page will contain 30 articles by default.'
operationId: getLatestArticles
parameters:
- $ref: '#/components/parameters/pageParam'
- $ref: '#/components/parameters/perPageParam30to1000'
responses:
'200':
description: A List of Articles
content:
application/json:
example:
- type_of: article
id: 2239
title: The Mirror Crackd from Side to Side7
description: Vhs aesthetic park freegan microdosing polaroid keytar squid. Hammock hella cardigan shoreditch...
readable_publish_date: May 28
slug: the-mirror-crackd-from-side-to-side7-98n
path: /username15/the-mirror-crackd-from-side-to-side7-98n
url: http://forem.test/username15/the-mirror-crackd-from-side-to-side7-98n
comments_count: 0
public_reactions_count: 0
collection_id: null
published_timestamp: '2026-05-28T18:45:17Z'
language: en
subforem_id: null
positive_reactions_count: 0
cover_image: http://forem.test/assets/34-d27f3a4a9f6f1f373003c74b31749764691f510b2a18b55039478583864a067e.png
social_image: http://forem.test/assets/34-d27f3a4a9f6f1f373003c74b31749764691f510b2a18b55039478583864a067e.png
canonical_url: http://forem.test/username15/the-mirror-crackd-from-side-to-side7-98n
created_at: '2026-05-28T18:45:17Z'
edited_at: null
crossposted_at: null
published_at: '2026-05-28T18:45:17Z'
last_comment_at: '2026-05-28T18:45:17Z'
reading_time_minutes: 1
tag_list:
- javascript
- html
- discuss
tags: javascript, html, discuss
user:
name: Evelina "Norman" \:/ Moen
username: username15
twitter_username: twitter15
github_username: github15
user_id: 4063
website_url: null
profile_image: /uploads/user/profile_image/4063/194ffea0-3e45-440a-a97c-7b37da7fbf75.jpeg
profile_image_90: /uploads/user/profile_image/4063/194ffea0-3e45-440a-a97c-7b37da7fbf75.jpeg
flare_tag:
name: discuss
bg_color_hex: '#000000'
text_color_hex: '#ffffff'
- type_of: article
id: 2238
title: The Green Bay Tree6
description: Helvetica yr venmo xoxo direct trade meh. Forage polaroid etsy. Forage vhs fanny pack. Put a bird on...
readable_publish_date: May 28
slug: the-green-bay-tree6-4cif
path: /username14/the-green-bay-tree6-4cif
url: http://forem.test/username14/the-green-bay-tree6-4cif
comments_count: 0
public_reactions_count: 0
collection_id: null
published_timestamp: '2026-05-28T18:45:16Z'
language: null
subforem_id: null
positive_reactions_count: 0
cover_image: http://forem.test/assets/22-837b6c737e37b6d229b36d73e95ead7f26e0a346e0aa7dfbca74630ae161fb0d.png
social_image: http://forem.test/assets/22-837b6c737e37b6d229b36d73e95ead7f26e0a346e0aa7dfbca74630ae161fb0d.png
canonical_url: http://forem.test/username14/the-green-bay-tree6-4cif
created_at: '2026-05-28T18:45:16Z'
edited_at: null
crossposted_at: null
published_at: '2026-05-28T18:45:16Z'
last_comment_at: '2026-05-28T18:45:16Z'
reading_time_minutes: 1
tag_list:
- javascript
- html
- discuss
tags: javascript, html, discuss
user:
name: Aletha "Jordon" \:/ Lubowitz
username: username14
twitter_username: twitter14
github_username: github14
user_id: 4062
website_url: null
profile_image: /uploads/user/profile_image/4062/b1e0cad0-d46f-4386-9e32-28318fc4e6e9.jpeg
profile_image_90: /uploads/user/profile_image/4062/b1e0cad0-d46f-4386-9e32-28318fc4e6e9.jpeg
flare_tag:
name: discuss
bg_color_hex: '#000000'
text_color_hex: '#ffffff'
- type_of: article
id: 2237
title: His Dark Materials5
description: Kitsch pitchfork schlitz 90s. Everyday wes anderson flannel offal muggle magic biodiesel try-hard...
readable_publish_date: May 28
slug: his-dark-materials5-52pe
path: /username13/his-dark-materials5-52pe
url: http://forem.test/username13/his-dark-materials5-52pe
comments_count: 0
public_reactions_count: 0
collection_id: null
published_timestamp: '2026-05-28T18:45:16Z'
language: null
subforem_id: null
positive_reactions_count: 0
cover_image: http://forem.test/assets/40-57aabe055a9fc60491e0fca9a4dade362141764e7ad214956bbfc9c9e69763b0.png
social_image: http://forem.test/assets/40-57aabe055a9fc60491e0fca9a4dade362141764e7ad214956bbfc9c9e69763b0.png
canonical_url: http://forem.test/username13/his-dark-materials5-52pe
created_at: '2026-05-28T18:45:16Z'
edited_at: null
crossposted_at: null
published_at: '2026-05-28T18:45:16Z'
last_comment_at: '2026-05-28T18:45:16Z'
reading_time_minutes: 1
tag_list:
- javascript
- html
- discuss
tags: javascript, html, discuss
user:
name: Clinton "Timika" \:/ Konopelski
username: username13
twitter_username: twitter13
github_username: github13
user_id: 4061
website_url: null
profile_image: /uploads/user/profile_image/4061/b1948bf9-f870-463c-a72d-649a017353b4.jpeg
profile_image_90: /uploads/user/profile_image/4061/b1948bf9-f870-463c-a72d-649a017353b4.jpeg
flare_tag:
name: discuss
bg_color_hex: '#000000'
text_color_hex: '#ffffff'
schema:
type: array
items:
$ref: '#/components/schemas/ArticleIndex'
/api/articles/{id}:
get:
summary: Published article by id
security: []
tags:
- articles
description: This endpoint allows the client to retrieve a single published article given its `id`.
operationId: getArticleById
parameters:
- name: id
in: path
required: true
schema:
type: integer
responses:
'200':
description: An Article
content:
application/json:
example:
type_of: article
id: 2240
title: Blue Remembered Earth8
description: Yolo next level green juice banjo flexitarian photo booth. Chillwave ennui kogi. Thundercats...
readable_publish_date: May 28
slug: blue-remembered-earth8-3dmj
path: /username16/blue-remembered-earth8-3dmj
url: http://forem.test/username16/blue-remembered-earth8-3dmj
comments_count: 0
public_reactions_count: 0
collection_id: null
published_timestamp: '2026-05-28T18:45:17Z'
language: en
subforem_id: null
positive_reactions_count: 0
cover_image: http://forem.test/assets/12-f9d673ae4ff98002f782ab82c641f2f26673be728e8f5409bea83f2d1de15323.png
social_image: http://forem.test/assets/12-f9d673ae4ff98002f782ab82c641f2f26673be728e8f5409bea83f2d1de15323.png
canonical_url: http://forem.test/username16/blue-remembered-earth8-3dmj
created_at: '2026-05-28T18:45:17Z'
edited_at: null
crossposted_at: null
published_at: '2026-05-28T18:45:17Z'
last_comment_at: '2026-05-28T18:45:17Z'
reading_time_minutes: 1
tag_list: discuss
tags:
- discuss
body_html: '<p>Yolo next level green juice banjo flexitarian photo booth. Chillwave ennui kogi. Thundercats intelligentsia tousled typewriter flexitarian.</p>
<p>Before they sold out squid pbrb waistcoat.</p>
'
body_markdown: "---\ntitle: Blue Remembered Earth8\npublished: true\ntags: discuss\ndate: \nseries: \ncanonical_url: \n\n---\n\nYolo next level green juice banjo flexitarian photo booth. Chillwave ennui kogi. Thundercats intelligentsia tousled typewriter flexitarian.\n\n\nBefore they sold out squid pbrb waistcoat.\n\n"
user:
name: Vance "Larry" \:/ Nikolaus
username: username16
twitter_username: twitter16
github_username: github16
user_id: 4064
website_url: null
profile_image: /uploads/user/profile_image/4064/17fa7924-534e-4da2-8dc3-5de871a9e38e.jpeg
profile_image_90: /uploads/user/profile_image/4064/17fa7924-534e-4da2-8dc3-5de871a9e38e.jpeg
flare_tag:
name: discuss
bg_color_hex: '#000000'
text_color_hex: '#ffffff'
schema:
type: object
items:
$ref: '#/components/schemas/ArticleIndex'
'404':
description: Article Not Found
content:
application/json:
example:
error: not found
status: 404
put:
summary: Update an article by id
tags:
- articles
description: 'This endpoint allows the client to update an existing article.
"Articles" are all the posts that users create on DEV that typically show up in the feed. They can be a blog post, a discussion question, a help thread etc. but is referred to as article within the code.'
operationId: updateArticle
parameters:
- name: id
in: path
required: true
description: The ID of the user to unpublish.
schema:
type: integer
format: int32
minimum: 1
example: 123
responses:
'200':
description: An Article
content:
application/json:
example:
type_of: article
id: 2241
title: The Heart Is a Lonely Hunter9
description: Scenester banh mi truffaut. Helvetica keytar chillwave tote bag mixtape forage intelligentsia carry....
readable_publish_date: May 28
slug: the-heart-is-a-lonely-hunter9-2ip2
path: /username17/the-heart-is-a-lonely-hunter9-2ip2
url: http://forem.test/username17/the-heart-is-a-lonely-hunter9-2ip2
comments_count: 0
public_reactions_count: 0
collection_id: null
published_timestamp: '2026-05-28T18:45:17Z'
language: en
subforem_id: null
positive_reactions_count: 0
cover_image: http://forem.test/assets/23-33ea5a2b5af3dc15b9ed90de0b850f67e2390eaec3361d6687d3b9750c699f84.png
social_image: http://forem.test/assets/23-33ea5a2b5af3dc15b9ed90de0b850f67e2390eaec3361d6687d3b9750c699f84.png
canonical_url: http://forem.test/username17/the-heart-is-a-lonely-hunter9-2ip2
created_at: '2026-05-28T18:45:17Z'
edited_at: '2026-05-28T18:45:17Z'
crossposted_at: null
published_at: '2026-05-28T18:45:17Z'
last_comment_at: '2026-05-28T18:45:17Z'
reading_time_minutes: 1
tag_list: discuss
tags:
- discuss
body_html: '<p><strong>New</strong> body for the article</p>
'
body_markdown: '**New** body for the article'
user:
name: Celsa "Edwardo" \:/ Kirlin
username: username17
twitter_username: twitter17
github_username: github17
user_id: 4065
website_url: null
profile_image: /uploads/user/profile_image/4065/36a7e5c8-ce49-410d-8fc0-7c2b776c8d4f.jpeg
profile_image_90: /uploads/user/profile_image/4065/36a7e5c8-ce49-410d-8fc0-7c2b776c8d4f.jpeg
flare_tag:
name: discuss
bg_color_hex: '#000000'
text_color_hex: '#ffffff'
'404':
description: Article Not Found
content:
application/json:
example:
error: not found
status: 404
'401':
description: Unauthorized
content:
application/json:
example:
error: unauthorized
status: 401
'422':
description: Unprocessable Entity
content:
application/json:
example:
error: 'param is missing or the value is empty: article'
status: 422
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Article'
/api/articles/{username}/{slug}:
get:
summary: Published article by path
security: []
tags:
- articles
description: This endpoint allows the client to retrieve a single published article given its `path`.
operationId: getArticleByPath
parameters:
- name: username
in: path
required: true
schema:
type: string
- name: slug
in: path
required: true
schema:
type: string
responses:
'200':
description: An Article
content:
application/json:
example:
type_of: article
id: 2244
title: Of Human Bondage12
description: Vinegar bespoke mumblecore polaroid. Portland 3 wolf moon yolo austin scenester meditation artisan...
readable_publish_date: May 28
slug: of-human-bondage12-4bfh
path: /username21/of-human-bondage12-4bfh
url: http://forem.test/username21/of-human-bondage12-4bfh
comments_count: 0
public_reactions_count: 0
collection_id: null
published_timestamp: '2026-05-28T18:45:17Z'
language: null
subforem_id: null
positive_reactions_count: 0
cover_image: http://forem.test/assets/20-92231c1d2ddb3b707b8c1b5cb711ef17632ff2a64495970a58518ce33c3a4f76.png
social_image: http://forem.test/assets/20-92231c1d2ddb3b707b8c1b5cb711ef17632ff2a64495970a58518ce33c3a4f76.png
canonical_url: http://forem.test/username21/of-human-bondage12-4bfh
created_at: '2026-05-28T18:45:17Z'
edited_at: null
crossposted_at: null
published_at: '2026-05-28T18:45:17Z'
last_comment_at: '2026-05-28T18:45:17Z'
reading_time_minutes: 1
tag_list: discuss
tags:
- discuss
body_html: '<p>Vinegar bespoke mumblecore polaroid. Portland 3 wolf moon yolo austin scenester meditation artisan pbrb.</p>
<p>Meggings master yolo cliche. Pop-up put a bird on it poutine single-origin coffee brunch.</p>
'
body_markdown: "---\ntitle: Of Human Bondage12\npublished: true\ntags: discuss\ndate: \nseries: \ncanonical_url: \n\n---\n\nVinegar bespoke mumblecore polaroid. Portland 3 wolf moon yolo austin scenester meditation artisan pbrb.\n\n\nMeggings master yolo cliche. Pop-up put a bird on it poutine single-origin coffee brunch.\n\n"
user:
name: Joaquin "Tayna" \:/ Veum
username: username21
twitter_username: twitter21
github_username: github21
user_id: 4069
website_url: null
profile_image: /uploads/user/profile_image/4069/cd9be7fb-4277-4e90-9351-de7a241d1856.jpeg
profile_image_90: /uploads/user/profile_image/4069/cd9be7fb-4277-4e90-9351-de7a241d1856.jpeg
flare_tag:
name: discuss
bg_color_hex: '#000000'
text_color_hex: '#ffffff'
schema:
type: object
items:
$ref: '#/components/schemas/ArticleIndex'
'404':
description: Article Not Found
content:
application/json:
example:
error: not found
status: 404
/api/articles/me:
get:
summary: User's articles
tags:
- articles
description: 'This endpoint allows the client to retrieve a list of published articles on behalf of an authenticated user.
"Articles" are all the posts that users create on DEV that typically show up in the feed. They can be a blog post, a discussion question, a help thread etc. but is referred to as article within the code.
Published articles will be in reverse chronological publication order.
It will return published articles with pagination. By default a page will contain 30 articles.'
operationId: getUserArticles
parameters:
- $ref: '#/components/parameters/pageParam'
- $ref: '#/components/parameters/perPageParam30to1000'
responses:
'401':
description: Unauthorized
content:
application/json:
example:
error: unauthorized
status: 401
'200':
description: A List of the authenticated user's Articles
content:
application/json:
example: []
schema:
type: array
items:
$ref: '#/components/schemas/ArticleIndex'
/api/articles/me/published:
get:
summary: User's published articles
tags:
- articles
description: 'This endpoint allows the client to retrieve a list of published articles on behalf of an authenticated user.
"Articles" are all the posts that users create on DEV that typically show up in the feed. They can be a blog post, a discussion question, a help thread etc. but is referred to as article within the code.
Published articles will be in reverse chronological publication order.
It will return published articles with pagination. By default a page will contain 30 articles.'
operationId: getUserPublishedArticles
parameters:
- $ref: '#/components/parameters/pageParam'
- $ref: '#/components/parameters/perPageParam30to1000'
responses:
'401':
description: Unauthorized
content:
application/json:
example:
error: unauthorized
status: 401
'200':
description: A List of the authenticated user's Articles
content:
application/json:
example: []
schema:
type: array
items:
$ref: '#/components/schemas/ArticleIndex'
/api/articles/me/unpublished:
get:
summary: User's unpublished articles
tags:
- articles
description: 'This endpoint allows the client to retrieve a list of unpublished articles on behalf of an authenticated user.
"Articles" are all the posts that users create on DEV that typically show up in the feed. They can be a blog post, a discussion question, a help thread etc. but is referred to as article within the code.
Unpublished articles will be in reverse chronological creation order.
It will return unpublished articles with pagination. By default a page will contain 30 articles.'
operationId: getUserUnpublishedArticles
parameters:
- $ref: '#/components/parameters/pageParam'
- $ref: '#/components/parameters/perPageParam30to1000'
responses:
'401':
description: Unauthorized
content:
application/json:
example:
error: unauthorized
status: 401
'200':
description: A List of the authenticated user's Articles
content:
application/json:
example: []
schema:
type: array
items:
$ref: '#/components/schemas/ArticleIndex'
/api/articles/me/all:
get:
summary: User's all articles
tags:
- articles
description: 'This endpoint allows the client to retrieve a list of all articles on behalf of an authenticated user.
"Articles" are all the posts that users create on DEV that typically show up in the feed. They can be a blog post, a discussion question, a help thread etc. but is referred to as article within the code.
It will return both published and unpublished articles with pagination.
Unpublished articles will be at the top of the list in reverse chronological creation order. Published articles will follow in reverse chronological publication order.
By default a pag
# --- truncated at 32 KB (85 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/devto/refs/heads/main/openapi/devto-articles-api-openapi.yml