DEV API (beta) (0.9.7)
Download OpenAPI specification:Download
Access Forem articles, users and other resources via API.
For a real-world example of Forem in action, check out DEV.
All endpoints that don't require authentication are CORS enabled.
All requests must send a user-agent header.
Dates and date times, unless otherwise specified, must be in the RFC 3339 format.
Published articles
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.
query Parameters
page | integer <int32> >= 1 Default: 1 Pagination page. |
per_page | integer <int32> [ 1 .. 1000 ] Default: 30 Page size (the number of items to return per page). |
tag | string Example: tag=discuss 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 |
tags | string Example: tags=javascript, css Using this parameter will retrieve articles with any of the comma-separated tags. Articles will be ordered by descending popularity. |
tags_exclude | string Example: tags_exclude=node, java Using this parameter will retrieve articles that do not contain any of comma-separated tags. Articles will be ordered by descending popularity. |
username | string Example: username=ben Using this parameter will retrieve articles belonging to a User or Organization ordered by descending publication date. If This parameter can be used in conjuction with |
state | string Enum: "fresh" "rising" "all" Example: state=fresh Using this parameter will allow the client to check which articles are fresh or rising. If This param can be used in conjuction with |
top | integer <int32> >= 1 Example: top=2 Using this parameter will allow the client to return the most popular articles
in the last
This param can be used in conjuction with |
collection_id | integer <int32> Example: collection_id=99 Adding this will allow the client to return the list of articles belonging to the requested collection, ordered by ascending publication date. |
Responses
Request samples
- curl (all articles)
- curl (user's articles)
curl https://dev.to/api/articles
Response samples
- 200
[- {
- "type_of": "article",
- "id": 194541,
- "title": "There's a new DEV theme in town for all you 10x hackers out there (plus one actually useful new feature)",
- "description": "",
- "readable_publish_date": "Oct 24",
- "tag_list": [
- "meta",
- "changelog",
- "css",
- "ux"
], - "tags": "meta, changelog, css, ux",
- "slug": "there-s-a-new-dev-theme-in-town-for-all-you-10x-hackers-out-there-plus-one-actually-useful-new-feature-2kgk",
- "path": "/devteam/there-s-a-new-dev-theme-in-town-for-all-you-10x-hackers-out-there-plus-one-actually-useful-new-feature-2kgk",
- "comments_count": 37,
- "positive_reactions_count": 12,
- "public_reactions_count": 142,
- "collection_id": null,
- "created_at": "2019-10-24T13:41:29Z",
- "edited_at": "2019-10-24T13:56:35Z",
- "crossposted_at": null,
- "published_at": "2019-10-24T13:52:17Z",
- "last_comment_at": "2019-10-25T08:12:43Z",
- "published_timestamp": "2019-10-24T13:52:17Z",
- "reading_time_minutes": 15,
- "user": {
- "name": "Ben Halpern",
- "username": "ben",
- "twitter_username": "bendhalpern",
- "github_username": "benhalpern",
}, - "organization": {
- "name": "The DEV Team",
- "username": "devteam",
- "slug": "devteam",
}
}
]
Create a new article
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.
Rate limiting
There is a limit of 10 requests per 30 seconds.
Additional resources
Authorizations:
Request Body schema: application/json
Article to create
object | |||||||||||||||||||
|
Responses
Request samples
- Payload
- curl
- curl (with front matter)
{- "article": {
- "title": "Hello, World!",
- "published": true,
- "body_markdown": "Hello DEV, this is my first post",
- "tags": [
- "discuss",
- "help"
], - "series": "Hello series"
}
}
Response samples
- 201
- 400
- 401
- 403
- 422
- 429
{- "type_of": "article",
- "id": 150589,
- "title": "Byte Sized Episode 2: The Creation of Graph Theory ",
- "description": "The full story of Leonhard Euler and the creation of this fundamental computer science principle, delivered in a few minutes.",
- "readable_publish_date": "Aug 1",
- "tag_list": "computerscience, graphtheory, bytesized, history",
- "tags": [
- "computerscience",
- "graphtheory",
- "bytesized",
- "history"
], - "slug": "byte-sized-episode-2-the-creation-of-graph-theory-34g1",
- "path": "/bytesized/byte-sized-episode-2-the-creation-of-graph-theory-34g1",
- "comments_count": 21,
- "positive_reactions_count": 122,
- "public_reactions_count": 322,
- "collection_id": 1693,
- "created_at": "2019-07-31T11:15:06Z",
- "edited_at": null,
- "crossposted_at": null,
- "published_at": "2019-08-01T15:47:54Z",
- "last_comment_at": "2019-08-06T16:48:10Z",
- "published_timestamp": "2019-08-01T15:47:54Z",
- "reading_time_minutes": 15,
- "body_html": "<p>Today's episode of Byte Sized is about Leonhard Euler and the creation of <a href=\"https://en.wikipedia.org/wiki/Graph_theory\">Graph Theory</a>.</p>\n\n<p>For more about how Graph Theory works, check out this video from BaseCS!</p>...\n",
- "body_markdown": "---\r\ntitle: Byte Sized Episode 2: The Creation of Graph Theory \r\npublished: true\r\ndescription: The full story of Leonhard Euler and the creation of this fundamental computer science principle, delivered in a few minutes.\r\ntags: computerscience, graphtheory, bytesized, history\r\ncover_image: https://thepracticaldev.s3.amazonaws.com/i/88e62fzblbluz1dm7xjf.png\r\nseries: Byte Sized Season 1\r\n---\r\n\r\nToday's episode of Byte Sized is about Leonhard Euler and the creation of [Graph Theory](https://en.wikipedia.org/wiki/Graph_theory).\r\n\r\nFor more about how Graph Theory works, check out this video from BaseCS!...",
- "user": {
- "name": "Vaidehi Joshi",
- "username": "vaidehijoshi",
- "twitter_username": "vaidehijoshi",
- "github_username": "vaidehijoshi",
}, - "organization": {
- "name": "Byte Sized",
- "username": "bytesized",
- "slug": "bytesized",
}
}
Published articles sorted by publish date
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.
query Parameters
page | integer <int32> >= 1 Default: 1 Pagination page. |
per_page | integer <int32> [ 1 .. 1000 ] Default: 30 Page size (the number of items to return per page). |
Responses
Response samples
- 200
[- {
- "type_of": "article",
- "id": 194541,
- "title": "There's a new DEV theme in town for all you 10x hackers out there (plus one actually useful new feature)",
- "description": "",
- "readable_publish_date": "Oct 24",
- "tag_list": [
- "meta",
- "changelog",
- "css",
- "ux"
], - "tags": "meta, changelog, css, ux",
- "slug": "there-s-a-new-dev-theme-in-town-for-all-you-10x-hackers-out-there-plus-one-actually-useful-new-feature-2kgk",
- "path": "/devteam/there-s-a-new-dev-theme-in-town-for-all-you-10x-hackers-out-there-plus-one-actually-useful-new-feature-2kgk",
- "comments_count": 37,
- "positive_reactions_count": 12,
- "public_reactions_count": 142,
- "collection_id": null,
- "created_at": "2019-10-24T13:41:29Z",
- "edited_at": "2019-10-24T13:56:35Z",
- "crossposted_at": null,
- "published_at": "2019-10-24T13:52:17Z",
- "last_comment_at": "2019-10-25T08:12:43Z",
- "published_timestamp": "2019-10-24T13:52:17Z",
- "reading_time_minutes": 15,
- "user": {
- "name": "Ben Halpern",
- "username": "ben",
- "twitter_username": "bendhalpern",
- "github_username": "benhalpern",
}, - "organization": {
- "name": "The DEV Team",
- "username": "devteam",
- "slug": "devteam",
}
}
]
A published article by ID
This endpoint allows the client to retrieve a single
published article given its id
.
path Parameters
id required | integer <int32> >= 1 Example: 150589 Id of the article |
Responses
Request samples
- curl
curl https://dev.to/api/articles/150589
Response samples
- 200
- 404
{- "type_of": "article",
- "id": 150589,
- "title": "Byte Sized Episode 2: The Creation of Graph Theory ",
- "description": "The full story of Leonhard Euler and the creation of this fundamental computer science principle, delivered in a few minutes.",
- "readable_publish_date": "Aug 1",
- "tag_list": "computerscience, graphtheory, bytesized, history",
- "tags": [
- "computerscience",
- "graphtheory",
- "bytesized",
- "history"
], - "slug": "byte-sized-episode-2-the-creation-of-graph-theory-34g1",
- "path": "/bytesized/byte-sized-episode-2-the-creation-of-graph-theory-34g1",
- "comments_count": 21,
- "positive_reactions_count": 122,
- "public_reactions_count": 322,
- "collection_id": 1693,
- "created_at": "2019-07-31T11:15:06Z",
- "edited_at": null,
- "crossposted_at": null,
- "published_at": "2019-08-01T15:47:54Z",
- "last_comment_at": "2019-08-06T16:48:10Z",
- "published_timestamp": "2019-08-01T15:47:54Z",
- "reading_time_minutes": 15,
- "body_html": "<p>Today's episode of Byte Sized is about Leonhard Euler and the creation of <a href=\"https://en.wikipedia.org/wiki/Graph_theory\">Graph Theory</a>.</p>\n\n<p>For more about how Graph Theory works, check out this video from BaseCS!</p>...\n",
- "body_markdown": "---\r\ntitle: Byte Sized Episode 2: The Creation of Graph Theory \r\npublished: true\r\ndescription: The full story of Leonhard Euler and the creation of this fundamental computer science principle, delivered in a few minutes.\r\ntags: computerscience, graphtheory, bytesized, history\r\ncover_image: https://thepracticaldev.s3.amazonaws.com/i/88e62fzblbluz1dm7xjf.png\r\nseries: Byte Sized Season 1\r\n---\r\n\r\nToday's episode of Byte Sized is about Leonhard Euler and the creation of [Graph Theory](https://en.wikipedia.org/wiki/Graph_theory).\r\n\r\nFor more about how Graph Theory works, check out this video from BaseCS!...",
- "user": {
- "name": "Vaidehi Joshi",
- "username": "vaidehijoshi",
- "twitter_username": "vaidehijoshi",
- "github_username": "vaidehijoshi",
}, - "organization": {
- "name": "Byte Sized",
- "username": "bytesized",
- "slug": "bytesized",
}
}
Update an article
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.
Rate limiting
There is a limit of 30 requests per 30 seconds.
Additional resources
Authorizations:
path Parameters
id required | integer <int32> >= 1 Example: 150589 Id of the article |
Request Body schema: application/json
Article params for the update.
Note: if the article contains a front matter in its body, its front matter properties will still take precedence over any JSON equivalent params, which means that the full body_markdown with the modified front matter params needs to be provided for an update to be successful
object | |||||||||||||||||||
|
Responses
Request samples
- Payload
- curl
{- "article": {
- "title": "Hello, World!",
- "published": true,
- "body_markdown": "Hello DEV, this is my first post",
- "tags": [
- "discuss",
- "help"
], - "series": "Hello series"
}
}
Response samples
- 200
- 400
- 401
- 403
- 422
- 429
{- "type_of": "article",
- "id": 150589,
- "title": "Byte Sized Episode 2: The Creation of Graph Theory ",
- "description": "The full story of Leonhard Euler and the creation of this fundamental computer science principle, delivered in a few minutes.",
- "readable_publish_date": "Aug 1",
- "tag_list": "computerscience, graphtheory, bytesized, history",
- "tags": [
- "computerscience",
- "graphtheory",
- "bytesized",
- "history"
], - "slug": "byte-sized-episode-2-the-creation-of-graph-theory-34g1",
- "path": "/bytesized/byte-sized-episode-2-the-creation-of-graph-theory-34g1",
- "comments_count": 21,
- "positive_reactions_count": 122,
- "public_reactions_count": 322,
- "collection_id": 1693,
- "created_at": "2019-07-31T11:15:06Z",
- "edited_at": null,
- "crossposted_at": null,
- "published_at": "2019-08-01T15:47:54Z",
- "last_comment_at": "2019-08-06T16:48:10Z",
- "published_timestamp": "2019-08-01T15:47:54Z",
- "reading_time_minutes": 15,
- "body_html": "<p>Today's episode of Byte Sized is about Leonhard Euler and the creation of <a href=\"https://en.wikipedia.org/wiki/Graph_theory\">Graph Theory</a>.</p>\n\n<p>For more about how Graph Theory works, check out this video from BaseCS!</p>...\n",
- "body_markdown": "---\r\ntitle: Byte Sized Episode 2: The Creation of Graph Theory \r\npublished: true\r\ndescription: The full story of Leonhard Euler and the creation of this fundamental computer science principle, delivered in a few minutes.\r\ntags: computerscience, graphtheory, bytesized, history\r\ncover_image: https://thepracticaldev.s3.amazonaws.com/i/88e62fzblbluz1dm7xjf.png\r\nseries: Byte Sized Season 1\r\n---\r\n\r\nToday's episode of Byte Sized is about Leonhard Euler and the creation of [Graph Theory](https://en.wikipedia.org/wiki/Graph_theory).\r\n\r\nFor more about how Graph Theory works, check out this video from BaseCS!...",
- "user": {
- "name": "Vaidehi Joshi",
- "username": "vaidehijoshi",
- "twitter_username": "vaidehijoshi",
- "github_username": "vaidehijoshi",
}, - "organization": {
- "name": "Byte Sized",
- "username": "bytesized",
- "slug": "bytesized",
}
}
A published article by path
This endpoint allows the client to retrieve a single
published article given its path
.
path Parameters
username required | string Example: devteam User or organization username. |
slug required | string Example: for-empowering-community-2k6h Slug of the article. |
Responses
Request samples
- curl
curl https://dev.to/api/articles/bytesized/byte-sized-episode-2-the-creation-of-graph-theory-34g1
Response samples
- 200
- 404
{- "type_of": "article",
- "id": 150589,
- "title": "Byte Sized Episode 2: The Creation of Graph Theory ",
- "description": "The full story of Leonhard Euler and the creation of this fundamental computer science principle, delivered in a few minutes.",
- "readable_publish_date": "Aug 1",
- "tag_list": "computerscience, graphtheory, bytesized, history",
- "tags": [
- "computerscience",
- "graphtheory",
- "bytesized",
- "history"
], - "slug": "byte-sized-episode-2-the-creation-of-graph-theory-34g1",
- "path": "/bytesized/byte-sized-episode-2-the-creation-of-graph-theory-34g1",
- "comments_count": 21,
- "positive_reactions_count": 122,
- "public_reactions_count": 322,
- "collection_id": 1693,
- "created_at": "2019-07-31T11:15:06Z",
- "edited_at": null,
- "crossposted_at": null,
- "published_at": "2019-08-01T15:47:54Z",
- "last_comment_at": "2019-08-06T16:48:10Z",
- "published_timestamp": "2019-08-01T15:47:54Z",
- "reading_time_minutes": 15,
- "body_html": "<p>Today's episode of Byte Sized is about Leonhard Euler and the creation of <a href=\"https://en.wikipedia.org/wiki/Graph_theory\">Graph Theory</a>.</p>\n\n<p>For more about how Graph Theory works, check out this video from BaseCS!</p>...\n",
- "body_markdown": "---\r\ntitle: Byte Sized Episode 2: The Creation of Graph Theory \r\npublished: true\r\ndescription: The full story of Leonhard Euler and the creation of this fundamental computer science principle, delivered in a few minutes.\r\ntags: computerscience, graphtheory, bytesized, history\r\ncover_image: https://thepracticaldev.s3.amazonaws.com/i/88e62fzblbluz1dm7xjf.png\r\nseries: Byte Sized Season 1\r\n---\r\n\r\nToday's episode of Byte Sized is about Leonhard Euler and the creation of [Graph Theory](https://en.wikipedia.org/wiki/Graph_theory).\r\n\r\nFor more about how Graph Theory works, check out this video from BaseCS!...",
- "user": {
- "name": "Vaidehi Joshi",
- "username": "vaidehijoshi",
- "twitter_username": "vaidehijoshi",
- "github_username": "vaidehijoshi",
}, - "organization": {
- "name": "Byte Sized",
- "username": "bytesized",
- "slug": "bytesized",
}
}
User's articles
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.
Authorizations:
query Parameters
page | integer <int32> >= 1 Default: 1 Pagination page. |
per_page | integer <int32> [ 1 .. 1000 ] Default: 30 Page size (the number of items to return per page). |
Responses
Request samples
- curl
curl -H "api-key: API_KEY" https://dev.to/api/articles/me
Response samples
- 200
- 401
[- {
- "type_of": "string",
- "id": 0,
- "title": "string",
- "description": "string",
- "cover_image": "string",
- "published": true,
- "published_at": "2019-08-24T14:15:22Z",
- "tag_list": [
- "string"
], - "slug": "string",
- "path": "string",
- "url": "string",
- "canonical_url": "string",
- "comments_count": 0,
- "positive_reactions_count": 0,
- "public_reactions_count": 0,
- "page_views_count": 0,
- "published_timestamp": "2019-08-24T14:15:22Z",
- "body_markdown": "string",
- "user": {
- "user_id": 0,
- "name": "string",
- "username": "string",
- "twitter_username": "string",
- "github_username": "string",
- "website_url": "string",
- "profile_image": "string",
- "profile_image_90": "string"
}, - "reading_time_minutes": 0,
- "organization": {
- "name": "string",
- "username": "string",
- "slug": "string",
- "profile_image": "string",
- "profile_image_90": "string"
}, - "flare_tag": {
- "name": "string",
- "bg_color_hex": "string",
- "text_color_hex": "string"
}
}
]
User's published articles
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.
Authorizations:
query Parameters
page | integer <int32> >= 1 Default: 1 Pagination page. |
per_page | integer <int32> [ 1 .. 1000 ] Default: 30 Page size (the number of items to return per page). |
Responses
Request samples
- curl
curl -H "api-key: API_KEY" https://dev.to/api/articles/me/published
Response samples
- 200
- 401
[- {
- "type_of": "string",
- "id": 0,
- "title": "string",
- "description": "string",
- "cover_image": "string",
- "published": true,
- "published_at": "2019-08-24T14:15:22Z",
- "tag_list": [
- "string"
], - "slug": "string",
- "path": "string",
- "url": "string",
- "canonical_url": "string",
- "comments_count": 0,
- "positive_reactions_count": 0,
- "public_reactions_count": 0,
- "page_views_count": 0,
- "published_timestamp": "2019-08-24T14:15:22Z",
- "body_markdown": "string",
- "user": {
- "user_id": 0,
- "name": "string",
- "username": "string",
- "twitter_username": "string",
- "github_username": "string",
- "website_url": "string",
- "profile_image": "string",
- "profile_image_90": "string"
}, - "reading_time_minutes": 0,
- "organization": {
- "name": "string",
- "username": "string",
- "slug": "string",
- "profile_image": "string",
- "profile_image_90": "string"
}, - "flare_tag": {
- "name": "string",
- "bg_color_hex": "string",
- "text_color_hex": "string"
}
}
]
User's unpublished articles
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.
Authorizations:
query Parameters
page | integer <int32> >= 1 Default: 1 Pagination page. |
per_page | integer <int32> [ 1 .. 1000 ] Default: 30 Page size (the number of items to return per page). |
Responses
Request samples
- curl
curl -H "api-key: API_KEY" https://dev.to/api/articles/me/unpublished
Response samples
- 200
- 401
[- {
- "type_of": "string",
- "id": 0,
- "title": "string",
- "description": "string",
- "cover_image": "string",
- "published": true,
- "published_at": "2019-08-24T14:15:22Z",
- "tag_list": [
- "string"
], - "slug": "string",
- "path": "string",
- "url": "string",
- "canonical_url": "string",
- "comments_count": 0,
- "positive_reactions_count": 0,
- "public_reactions_count": 0,
- "page_views_count": 0,
- "published_timestamp": "2019-08-24T14:15:22Z",
- "body_markdown": "string",
- "user": {
- "user_id": 0,
- "name": "string",
- "username": "string",
- "twitter_username": "string",
- "github_username": "string",
- "website_url": "string",
- "profile_image": "string",
- "profile_image_90": "string"
}, - "reading_time_minutes": 0,
- "organization": {
- "name": "string",
- "username": "string",
- "slug": "string",
- "profile_image": "string",
- "profile_image_90": "string"
}, - "flare_tag": {
- "name": "string",
- "bg_color_hex": "string",
- "text_color_hex": "string"
}
}
]
User's all articles
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 page will contain 30
articles.
Authorizations:
query Parameters
page | integer <int32> >= 1 Default: 1 Pagination page. |
per_page | integer <int32> [ 1 .. 1000 ] Default: 30 Page size (the number of items to return per page). |
Responses
Request samples
- curl
curl -H "api-key: API_KEY" https://dev.to/api/articles/me/all
Response samples
- 200
- 401
[- {
- "type_of": "string",
- "id": 0,
- "title": "string",
- "description": "string",
- "cover_image": "string",
- "published": true,
- "published_at": "2019-08-24T14:15:22Z",
- "tag_list": [
- "string"
], - "slug": "string",
- "path": "string",
- "url": "string",
- "canonical_url": "string",
- "comments_count": 0,
- "positive_reactions_count": 0,
- "public_reactions_count": 0,
- "page_views_count": 0,
- "published_timestamp": "2019-08-24T14:15:22Z",
- "body_markdown": "string",
- "user": {
- "user_id": 0,
- "name": "string",
- "username": "string",
- "twitter_username": "string",
- "github_username": "string",
- "website_url": "string",
- "profile_image": "string",
- "profile_image_90": "string"
}, - "reading_time_minutes": 0,
- "organization": {
- "name": "string",
- "username": "string",
- "slug": "string",
- "profile_image": "string",
- "profile_image_90": "string"
}, - "flare_tag": {
- "name": "string",
- "bg_color_hex": "string",
- "text_color_hex": "string"
}
}
]
Articles with a video
This endpoint allows the client to retrieve a list of articles that are uploaded with a video.
It will only return published video articles ordered by descending popularity.
It supports pagination, each page will contain 24
articles by default.
query Parameters
page | integer <int32> >= 1 Default: 1 Pagination page. |
per_page | integer <int32> [ 1 .. 1000 ] Default: 24 Page size (the number of items to return per page). |
Responses
Request samples
- curl (all video articles)
curl https://dev.to/api/videos
Response samples
- 200
[- {
- "type_of": "video_article",
- "id": 273532,
- "path": "/devteam/basecs-depth-first-search-implementing-4kkl",
- "title": "BaseCS: Depth First Search Implementing",
- "user_id": 2882,
- "video_duration_in_minutes": "11:47",
- "user": {
- "name": "Vaidehi Joshi"
}
}
]
Comments
This endpoint allows the client to retrieve all comments belonging to an article or podcast episode as threaded conversations.
It will return the all top level comments with their nested comments as threads. See the format specification for further details.
query Parameters
a_id | integer <int32> >= 1 Example: a_id=270180 Article identifier. |
p_id | integer <int32> >= 1 Example: p_id=124 Podcast Episode identifier. |
Responses
Request samples
- curl (all comments of an article)
- curl (all comments of a podcast episode)
curl https://dev.to/api/comments?a_id=270180
Response samples
- 200
- 404
[- {
- "type_of": "comment",
- "id_code": "m3m0",
- "created_at": "2020-07-01T17:59:43Z",
- "body_html": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body>\n<p>...</p>\n\n</body></html>\n",
- "user": {
- "user_id": 4056,
- "name": "Heriberto Morissette",
- "username": "heriberto_morissette",
- "twitter_username": null,
- "github_username": null,
- "website_url": null,
}, - "children": [ ]
}, - {
- "type_of": "comment",
- "id_code": "m357",
- "created_at": "2020-07-02T17:19:40Z",
- "body_html": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body>\n<p>...</p>\n\n<p>...</p>\n\n</body></html>\n",
- "user": {
- "name": "Dario Waelchi",
- "username": "dario waelchi",
- "twitter_username": null,
- "github_username": null,
- "user_id": 7707,
- "website_url": null,
}, - "children": [
- {
- "type_of": "comment",
- "id_code": "m35m",
- "created_at": "2020-08-01T11:59:40Z",
- "body_html": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body>\n\n<p>...</p>\n\n</body></html>\n",
- "user": {
- "name": "rhymes",
- "username": "rhymes",
- "twitter_username": null,
- "github_username": null,
- "user_id": 819,
- "website_url": null,
}, - "children": [ ]
}
]
}
]
Comment
This endpoint allows the client to retrieve a comment as well as his descendants comments.
It will return the required comment (the root) with its nested descendants as a thread.
See the format specification for further details.
path Parameters
id required | string Example: m35m Comment identifier. |
Responses
Request samples
- curl (a comment and its descendants)
curl https://dev.to/api/comments/m51e
Response samples
- 200
- 404
{- "type_of": "comment",
- "id_code": "m357",
- "created_at": "2020-08-02T17:19:40Z",
- "body_html": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body>\n<p>...</p>\n\n<p>...</p>\n\n</body></html>\n",
- "user": {
- "name": "Dario Waelchi",
- "username": "dario waelchi",
- "twitter_username": null,
- "github_username": null,
- "website_url": null,
}, - "children": [
- {
- "type_of": "comment",
- "id_code": "m35m",
- "created_at": "2020-07-02T17:19:40Z",
- "body_html": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body>\n\n<p>...</p>\n\n</body></html>\n",
- "user": {
- "name": "rhymes",
- "username": "rhymes",
- "twitter_username": null,
- "github_username": null,
- "website_url": null,
}, - "children": [ ]
}
]
}
Followed tags
This endpoint allows the client to retrieve a list of the tags they follow.
Authorizations:
Responses
Request samples
- curl
curl -H "api-key: API_KEY" https://dev.to/api/follows/tags
Response samples
- 200
- 401
[- {
- "id": 13,
- "name": "discuss",
- "points": 3
}, - {
- "id": 12,
- "name": "webdev",
- "points": 1
}
]
Followers
This endpoint allows the client to retrieve a list of the followers they have.
"Followers" are users that are following other users on the website.
It supports pagination, each page will contain 80
followers by default.
Authorizations:
query Parameters
page | integer <int32> >= 1 Default: 1 Pagination page. |
per_page | integer <int32> [ 1 .. 1000 ] Default: 80 Page size (the number of items to return per page). |
sort | string^-?\w+(,-?\w+)*$ Default: "created_at" Specifies the sort order for the |
Responses
Request samples
- curl
curl -H "api-key: API_KEY" https://dev.to/api/followers/users
Response samples
- 200
- 401
[- {
- "type_of": "user_follower",
- "id": 12,
- "created_at": "2021-04-02T04:21:46Z",
- "user_id": 3081,
- "name": "Mrs. Neda Morissette",
- "path": "/nedamrsmorissette",
- "username": "nedamrsmorissette",
}, - {
- "type_of": "user_follower",
- "id": 11,
- "created_at": "2021-04-02T04:21:46Z",
- "user_id": 7466,
- "name": "Yoko Hintz",
- "path": "/yokohintz",
- "username": "yokohintz",
}
]
Published listings
This endpoint allows the client to retrieve a list of listings.
"Listings" are classified ads that users create on DEV. They can be related to conference announcements, job offers, mentorships, upcoming events and more.
By default it will return published listings ordered by descending freshness.
It supports pagination, each page will contain 30
articles by default.
query Parameters
page | integer <int32> >= 1 Default: 1 Pagination page. |
per_page | integer <int32> [ 1 .. 1000 ] Default: 30 Page size (the number of items to return per page). |
category | string Example: category=cfp Using this parameter will return listings belonging to the requested category. |
Responses
Request samples
- curl (all listings)
curl https://dev.to/api/listings
Response samples
- 200
[- {
- "type_of": "listing",
- "id": 1157,
- "created_at": "2021-04-07 08:29:42 UTC",
- "title": "TestBash Detroit",
- "slug": "testbash-detroit-50gb",
- "body_markdown": "Do you want to learn about automation? Maybe you're interested in AI-driven testing? Security testing? We have a selection of talks, workshops and training courses to help you in a wide variety of areas in software testing. Join us for our very first trip to Detroit MI! \n\nhttps://bit.ly/TBDetroit",
- "tag_list": "events",
- "tags": [
- "events"
], - "category": "cfp",
- "processed_html": "<p>Do you want to learn about automation? Maybe you're interested in AI-driven testing? Security testing? We have a selection of talks, workshops and training courses to help you in a wide variety of areas in software testing. Join us for our very first trip to Detroit MI! </p>\n\n<p><a href=\"https://bit.ly/TBDetroit\">https://bit.ly/TBDetroit</a></p>\n",
- "published": true,
- "user": {
- "name": "Heather",
- "username": "heatherr",
- "twitter_username": null,
- "github_username": "Heather-R",
- "website_url": null,
}
}
]
Create a new listing
This endpoint allows the client to create a new listing.
"Listings" are classified ads that users create on DEV. They can be related to conference announcements, job offers, mentorships, upcoming events and more.
The user creating the listing or the organization on which behalf the user is creating for need to have enough credits for this operation to be successful. The server will prioritize the organization's credits over the user's credits.
Additional resources
Authorizations:
Request Body schema: application/json
Listing to create
object | |||||||||||||||||||||
|
Responses
Request samples
- Payload
- curl
- curl (with tags)
- curl (draft)
{- "listing": {
- "title": "ACME Conference",
- "body_markdown": "Awesome conference",
- "category": "cfp",
- "tags": [
- "events"
]
}
}
Response samples
- 201
- 400
- 401
- 402
- 422
{- "type_of": "listing",
- "id": 1157,
- "title": "TestBash Detroit",
- "slug": "testbash-detroit-50gb",
- "body_markdown": "Do you want to learn about automation? Maybe you're interested in AI-driven testing? Security testing? We have a selection of talks, workshops and training courses to help you in a wide variety of areas in software testing. Join us for our very first trip to Detroit MI! \n\nhttps://bit.ly/TBDetroit",
- "tag_list": "events",
- "tags": [
- "events"
], - "category": "cfp",
- "processed_html": "<p>Do you want to learn about automation? Maybe you're interested in AI-driven testing? Security testing? We have a selection of talks, workshops and training courses to help you in a wide variety of areas in software testing. Join us for our very first trip to Detroit MI! </p>\n\n<p><a href=\"https://bit.ly/TBDetroit\">https://bit.ly/TBDetroit</a></p>\n",
- "published": true,
- "user": {
- "name": "Heather",
- "username": "heatherr",
- "twitter_username": null,
- "github_username": "Heather-R",
- "website_url": null,
}
}
Published listings by category
This endpoint allows the client to retrieve a list of listings belonging to the specified category.
"Listings" are classified ads that users create on DEV. They can be related to conference announcements, job offers, mentorships, upcoming events and more.
By default it will return published listings ordered by descending freshness.
It supports pagination, each page will contain 30
articles by default.
path Parameters
category required | string (ListingCategory) Enum: "cfp" "forhire" "collabs" "education" "jobs" "mentors" "products" "mentees" "forsale" "events" "misc" The category of the listing |
query Parameters
page | integer <int32> >= 1 Default: 1 Pagination page. |
per_page | integer <int32> [ 1 .. 1000 ] Default: 30 Page size (the number of items to return per page). |
Responses
Request samples
- curl (call for papers listings)
curl https://dev.to/api/listings/category/cfp
Response samples
- 200
[- {
- "type_of": "listing",
- "id": 1157,
- "created_at": "2021-04-07 08:29:42 UTC",
- "title": "TestBash Detroit",
- "slug": "testbash-detroit-50gb",
- "body_markdown": "Do you want to learn about automation? Maybe you're interested in AI-driven testing? Security testing? We have a selection of talks, workshops and training courses to help you in a wide variety of areas in software testing. Join us for our very first trip to Detroit MI! \n\nhttps://bit.ly/TBDetroit",
- "tag_list": "events",
- "tags": [
- "events"
], - "category": "cfp",
- "processed_html": "<p>Do you want to learn about automation? Maybe you're interested in AI-driven testing? Security testing? We have a selection of talks, workshops and training courses to help you in a wide variety of areas in software testing. Join us for our very first trip to Detroit MI! </p>\n\n<p><a href=\"https://bit.ly/TBDetroit\">https://bit.ly/TBDetroit</a></p>\n",
- "published": true,
- "user": {
- "name": "Heather",
- "username": "heatherr",
- "twitter_username": null,
- "github_username": "Heather-R",
- "website_url": null,
}
}
]
A listing
This endpoint allows the client to retrieve
a single listing given its id
.
An unpublished listing is only accessible if authentication is supplied and it belongs to the authenticated user.
Authorizations:
path Parameters
id required | integer <int64> >= 1 Example: 1 Id of the listing |
Responses
Request samples
- curl
- curl (with authentication)
curl https://dev.to/api/listings/1184
Response samples
- 200
- 404
{- "type_of": "listing",
- "id": 1157,
- "title": "TestBash Detroit",
- "slug": "testbash-detroit-50gb",
- "body_markdown": "Do you want to learn about automation? Maybe you're interested in AI-driven testing? Security testing? We have a selection of talks, workshops and training courses to help you in a wide variety of areas in software testing. Join us for our very first trip to Detroit MI! \n\nhttps://bit.ly/TBDetroit",
- "tag_list": "events",
- "tags": [
- "events"
], - "category": "cfp",
- "processed_html": "<p>Do you want to learn about automation? Maybe you're interested in AI-driven testing? Security testing? We have a selection of talks, workshops and training courses to help you in a wide variety of areas in software testing. Join us for our very first trip to Detroit MI! </p>\n\n<p><a href=\"https://bit.ly/TBDetroit\">https://bit.ly/TBDetroit</a></p>\n",
- "published": true,
- "user": {
- "name": "Heather",
- "username": "heatherr",
- "twitter_username": null,
- "github_username": "Heather-R",
- "website_url": null,
}
}
Update a listing
This endpoint allows the client to update an existing listing.
Authorizations:
path Parameters
id required | integer <int64> >= 1 Example: 1 Id of the listing |
Request Body schema: application/json
Listing params for the update.
Note: except for bumping, publishing and unpublishing there are the following restrictions on the ability to update listings:
- the payload has to contain at least one param among
title
,body_markdown
ortags
/tag_list
- the listing can't be updated if it has not been bumped in the last 24 hours
- the listing can't be updated if it has been published but not recently bumped
object | |||||||||||||||||||
|
Responses
Request samples
- Payload
- curl (bump)
- curl (update)
{- "listing": {
- "action": "bump"
}
}
Response samples
- 200
- 400
- 401
- 402
- 422
{- "type_of": "article",
- "id": 150589,
- "title": "Byte Sized Episode 2: The Creation of Graph Theory ",
- "description": "The full story of Leonhard Euler and the creation of this fundamental computer science principle, delivered in a few minutes.",
- "readable_publish_date": "Aug 1",
- "tag_list": "computerscience, graphtheory, bytesized, history",
- "tags": [
- "computerscience",
- "graphtheory",
- "bytesized",
- "history"
], - "slug": "byte-sized-episode-2-the-creation-of-graph-theory-34g1",
- "path": "/bytesized/byte-sized-episode-2-the-creation-of-graph-theory-34g1",
- "comments_count": 21,
- "positive_reactions_count": 122,
- "public_reactions_count": 322,
- "collection_id": 1693,
- "created_at": "2019-07-31T11:15:06Z",
- "edited_at": null,
- "crossposted_at": null,
- "published_at": "2019-08-01T15:47:54Z",
- "last_comment_at": "2019-08-06T16:48:10Z",
- "published_timestamp": "2019-08-01T15:47:54Z",
- "reading_time_minutes": 15,
- "body_html": "<p>Today's episode of Byte Sized is about Leonhard Euler and the creation of <a href=\"https://en.wikipedia.org/wiki/Graph_theory\">Graph Theory</a>.</p>\n\n<p>For more about how Graph Theory works, check out this video from BaseCS!</p>...\n",
- "body_markdown": "---\r\ntitle: Byte Sized Episode 2: The Creation of Graph Theory \r\npublished: true\r\ndescription: The full story of Leonhard Euler and the creation of this fundamental computer science principle, delivered in a few minutes.\r\ntags: computerscience, graphtheory, bytesized, history\r\ncover_image: https://thepracticaldev.s3.amazonaws.com/i/88e62fzblbluz1dm7xjf.png\r\nseries: Byte Sized Season 1\r\n---\r\n\r\nToday's episode of Byte Sized is about Leonhard Euler and the creation of [Graph Theory](https://en.wikipedia.org/wiki/Graph_theory).\r\n\r\nFor more about how Graph Theory works, check out this video from BaseCS!...",
- "user": {
- "name": "Vaidehi Joshi",
- "username": "vaidehijoshi",
- "twitter_username": "vaidehijoshi",
- "github_username": "vaidehijoshi",
}, - "organization": {
- "name": "Byte Sized",
- "username": "bytesized",
- "slug": "bytesized",
}
}
An organization
This endpoint allows the client to retrieve a single organization by their username
path Parameters
username required | string Example: ecorp Username of the organization |
Responses
Request samples
- curl
curl https://dev.to/api/organizations/ecorp
Response samples
- 200
- 404
{- "type_of": "organization",
- "username": "ecorp",
- "name": "E Corp",
- "summary": "Together we can change the world, with E Corp",
- "twitter_username": "ecorp",
- "github_username": "ecorp",
- "location": "New York",
- "joined_at": "2019-10-24T13:41:29Z",
- "tech_stack": "Ruby",
- "tag_line": null,
- "story": null
}
Organization's users
This endpoint allows the client to retrieve a list of users belonging to the organization
It supports pagination, each page will contain 30
users by default.
path Parameters
username required | string Example: ecorp Username of the organization |
query Parameters
page | integer <int32> >= 1 Default: 1 Pagination page. |
per_page | integer <int32> [ 1 .. 1000 ] Default: 30 Page size (the number of items to return per page). |
Responses
Request samples
- curl
curl https://dev.to/api/organizations/ecorp/users
Response samples
- 200
- 404
[- {
- "type_of": "user",
- "id": 1234,
- "username": "bob",
- "name": "bob",
- "summary": "Hello, world",
- "twitter_username": "bob",
- "github_username": "bob",
- "website_url": null,
- "location": "New York",
- "joined_at": "Jan 1, 2017",
}
]
Organization's listings
This endpoint allows the client to retrieve a list of listings belonging to the organization
It supports pagination, each page will contain 30
listing by default.
path Parameters
username required | string Example: ecorp Username of the organization |
query Parameters
page | integer <int32> >= 1 Default: 1 Pagination page. |
per_page | integer <int32> [ 1 .. 1000 ] Default: 30 Page size (the number of items to return per page). |
category | string Example: category=cfp Using this parameter will return listings belonging to the requested category. |
Responses
Request samples
- curl
curl https://dev.to/api/organizations/ecorp/listings
Response samples
- 200
- 404
[- {
- "type_of": "listing",
- "id": 1157,
- "title": "TestBash Detroit",
- "slug": "testbash-detroit-50gb",
- "body_markdown": "Do you want to learn about automation? Maybe you're interested in AI-driven testing? Security testing? We have a selection of talks, workshops and training courses to help you in a wide variety of areas in software testing. Join us for our very first trip to Detroit MI! \n\nhttps://bit.ly/TBDetroit",
- "tag_list": "events",
- "tags": [
- "events"
], - "category": "cfp",
- "processed_html": "<p>Do you want to learn about automation? Maybe you're interested in AI-driven testing? Security testing? We have a selection of talks, workshops and training courses to help you in a wide variety of areas in software testing. Join us for our very first trip to Detroit MI! </p>\n\n<p><a href=\"https://bit.ly/TBDetroit\">https://bit.ly/TBDetroit</a></p>\n",
- "published": true,
- "user": {
- "name": "Heather",
- "username": "heatherr",
- "twitter_username": null,
- "github_username": "Heather-R",
- "website_url": null,
}, - "organization": {
- "name": "E Corp",
- "username": "ecorp",
- "slug": "ecorp",
}
}
]
Organization's Articles
This endpoint allows the client to retrieve a list of Articles belonging to the organization
It supports pagination, each page will contain 30
articles by default.
path Parameters
username required | string Example: ecorp Username of the organization |
query Parameters
page | integer <int32> >= 1 Default: 1 Pagination page. |
per_page | integer <int32> [ 1 .. 1000 ] Default: 30 Page size (the number of items to return per page). |
Responses
Request samples
- curl
curl https://dev.to/api/organizations/ecorp/articles
Response samples
- 200
- 404
[- {
- "type_of": "article",
- "id": 194541,
- "title": "There's a new DEV theme in town for all you 10x hackers out there (plus one actually useful new feature)",
- "description": "",
- "readable_publish_date": "Oct 24",
- "tag_list": [
- "meta",
- "changelog",
- "css",
- "ux"
], - "tags": "meta, changelog, css, ux",
- "slug": "there-s-a-new-dev-theme-in-town-for-all-you-10x-hackers-out-there-plus-one-actually-useful-new-feature-2kgk",
- "path": "/devteam/there-s-a-new-dev-theme-in-town-for-all-you-10x-hackers-out-there-plus-one-actually-useful-new-feature-2kgk",
- "comments_count": 37,
- "positive_reactions_count": 12,
- "public_reactions_count": 142,
- "collection_id": null,
- "created_at": "2019-10-24T13:41:29Z",
- "edited_at": "2019-10-24T13:56:35Z",
- "crossposted_at": null,
- "published_at": "2019-10-24T13:52:17Z",
- "last_comment_at": "2019-10-25T08:12:43Z",
- "published_timestamp": "2019-10-24T13:52:17Z",
- "reading_time_minutes": 15,
- "user": {
- "name": "Ben Halpern",
- "username": "ben",
- "twitter_username": "bendhalpern",
- "github_username": "benhalpern",
}, - "organization": {
- "name": "The DEV Team",
- "username": "devteam",
- "slug": "devteam",
}
}
]
Published podcast episodes
This endpoint allows the client to retrieve a list of podcast episodes.
"Podcast episodes" are episodes belonging to podcasts.
It will only return active podcast episodes that belong to published podcasts available on the platform, ordered by descending publication date.
It supports pagination, each page will contain 30
articles by default.
query Parameters
page | integer <int32> >= 1 Default: 1 Pagination page. |
per_page | integer <int32> [ 1 .. 1000 ] Default: 30 Page size (the number of items to return per page). |
username | string Example: username=codenewbie Using this parameter will retrieve episodes belonging to a specific podcast. |
Responses
Request samples
- curl (all podcast episodes)
- curl (all episodes belonging to a podcast)
curl https://dev.to/api/podcast_episodes
Response samples
- 200
- 404
[- {
- "type_of": "podcast_episodes",
- "id": 13894,
- "path": "/codenewbie/s11-e7-why-site-reliability-is-so-important-molly-struve",
- "title": "S11:E7 - Why site reliability is so important (Molly Struve)",
- "podcast": {
- "title": "CodeNewbie",
- "slug": "codenewbie",
}
}, - {
- "type_of": "podcast_episodes",
- "id": 13829,
- "path": "/codenewbie/s11-e6-what-are-the-pros-and-cons-of-working-in-civic-tech-aidan-feldman",
- "title": "S11:E6 - What are the pros and cons of working in civic tech (Aidan Feldman)",
- "podcast": {
- "title": "CodeNewbie",
- "slug": "codenewbie",
}
}
]
User's reading list
This endpoint allows the client to retrieve a list of readinglist reactions along with the related article for the authenticated user.
Reading list will be in reverse chronological order base on the creation of the reaction.
It will return paginated reading list items along with the articles
they refer to. By default a page will contain 30
items
Authorizations:
query Parameters
page | integer <int32> >= 1 Default: 1 Pagination page. |
per_page | integer <int32> [ 1 .. 100 ] Default: 30 Page size (the number of items to return per page). |
Responses
Request samples
- curl
curl -H "api-key: API_KEY" https://dev.to/api/readinglist
Response samples
- 200
- 401
[- {
- "type_of": "string",
- "id": 0,
- "status": "valid",
- "created_at": "2019-08-24T14:15:22Z",
- "article": {
- "type_of": "string",
- "id": 0,
- "title": "string",
- "description": "string",
- "cover_image": "string",
- "readable_publish_date": "string",
- "social_image": "string",
- "tag_list": [
- "string"
], - "tags": "string",
- "slug": "string",
- "path": "string",
- "url": "string",
- "canonical_url": "string",
- "comments_count": 0,
- "positive_reactions_count": 0,
- "public_reactions_count": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "edited_at": "2019-08-24T14:15:22Z",
- "crossposted_at": "2019-08-24T14:15:22Z",
- "published_at": "2019-08-24T14:15:22Z",
- "last_comment_at": "2019-08-24T14:15:22Z",
- "published_timestamp": "2019-08-24T14:15:22Z",
- "user": {
- "user_id": 0,
- "name": "string",
- "username": "string",
- "twitter_username": "string",
- "github_username": "string",
- "website_url": "string",
- "profile_image": "string",
- "profile_image_90": "string"
}, - "reading_time_minutes": 0,
- "organization": {
- "name": "string",
- "username": "string",
- "slug": "string",
- "profile_image": "string",
- "profile_image_90": "string"
}, - "flare_tag": {
- "name": "string",
- "bg_color_hex": "string",
- "text_color_hex": "string"
}
}
}
]
User's articles
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.
Authorizations:
query Parameters
page | integer <int32> >= 1 Default: 1 Pagination page. |
per_page | integer <int32> [ 1 .. 1000 ] Default: 30 Page size (the number of items to return per page). |
Responses
Request samples
- curl
curl -H "api-key: API_KEY" https://dev.to/api/articles/me
Response samples
- 200
- 401
[- {
- "type_of": "string",
- "id": 0,
- "title": "string",
- "description": "string",
- "cover_image": "string",
- "published": true,
- "published_at": "2019-08-24T14:15:22Z",
- "tag_list": [
- "string"
], - "slug": "string",
- "path": "string",
- "url": "string",
- "canonical_url": "string",
- "comments_count": 0,
- "positive_reactions_count": 0,
- "public_reactions_count": 0,
- "page_views_count": 0,
- "published_timestamp": "2019-08-24T14:15:22Z",
- "body_markdown": "string",
- "user": {
- "user_id": 0,
- "name": "string",
- "username": "string",
- "twitter_username": "string",
- "github_username": "string",
- "website_url": "string",
- "profile_image": "string",
- "profile_image_90": "string"
}, - "reading_time_minutes": 0,
- "organization": {
- "name": "string",
- "username": "string",
- "slug": "string",
- "profile_image": "string",
- "profile_image_90": "string"
}, - "flare_tag": {
- "name": "string",
- "bg_color_hex": "string",
- "text_color_hex": "string"
}
}
]
User's published articles
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.
Authorizations:
query Parameters
page | integer <int32> >= 1 Default: 1 Pagination page. |
per_page | integer <int32> [ 1 .. 1000 ] Default: 30 Page size (the number of items to return per page). |
Responses
Request samples
- curl
curl -H "api-key: API_KEY" https://dev.to/api/articles/me/published
Response samples
- 200
- 401
[- {
- "type_of": "string",
- "id": 0,
- "title": "string",
- "description": "string",
- "cover_image": "string",
- "published": true,
- "published_at": "2019-08-24T14:15:22Z",
- "tag_list": [
- "string"
], - "slug": "string",
- "path": "string",
- "url": "string",
- "canonical_url": "string",
- "comments_count": 0,
- "positive_reactions_count": 0,
- "public_reactions_count": 0,
- "page_views_count": 0,
- "published_timestamp": "2019-08-24T14:15:22Z",
- "body_markdown": "string",
- "user": {
- "user_id": 0,
- "name": "string",
- "username": "string",
- "twitter_username": "string",
- "github_username": "string",
- "website_url": "string",
- "profile_image": "string",
- "profile_image_90": "string"
}, - "reading_time_minutes": 0,
- "organization": {
- "name": "string",
- "username": "string",
- "slug": "string",
- "profile_image": "string",
- "profile_image_90": "string"
}, - "flare_tag": {
- "name": "string",
- "bg_color_hex": "string",
- "text_color_hex": "string"
}
}
]
User's unpublished articles
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.
Authorizations:
query Parameters
page | integer <int32> >= 1 Default: 1 Pagination page. |
per_page | integer <int32> [ 1 .. 1000 ] Default: 30 Page size (the number of items to return per page). |
Responses
Request samples
- curl
curl -H "api-key: API_KEY" https://dev.to/api/articles/me/unpublished
Response samples
- 200
- 401
[- {
- "type_of": "string",
- "id": 0,
- "title": "string",
- "description": "string",
- "cover_image": "string",
- "published": true,
- "published_at": "2019-08-24T14:15:22Z",
- "tag_list": [
- "string"
], - "slug": "string",
- "path": "string",
- "url": "string",
- "canonical_url": "string",
- "comments_count": 0,
- "positive_reactions_count": 0,
- "public_reactions_count": 0,
- "page_views_count": 0,
- "published_timestamp": "2019-08-24T14:15:22Z",
- "body_markdown": "string",
- "user": {
- "user_id": 0,
- "name": "string",
- "username": "string",
- "twitter_username": "string",
- "github_username": "string",
- "website_url": "string",
- "profile_image": "string",
- "profile_image_90": "string"
}, - "reading_time_minutes": 0,
- "organization": {
- "name": "string",
- "username": "string",
- "slug": "string",
- "profile_image": "string",
- "profile_image_90": "string"
}, - "flare_tag": {
- "name": "string",
- "bg_color_hex": "string",
- "text_color_hex": "string"
}
}
]
User's all articles
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 page will contain 30
articles.
Authorizations:
query Parameters
page | integer <int32> >= 1 Default: 1 Pagination page. |
per_page | integer <int32> [ 1 .. 1000 ] Default: 30 Page size (the number of items to return per page). |
Responses
Request samples
- curl
curl -H "api-key: API_KEY" https://dev.to/api/articles/me/all
Response samples
- 200
- 401
[- {
- "type_of": "string",
- "id": 0,
- "title": "string",
- "description": "string",
- "cover_image": "string",
- "published": true,
- "published_at": "2019-08-24T14:15:22Z",
- "tag_list": [
- "string"
], - "slug": "string",
- "path": "string",
- "url": "string",
- "canonical_url": "string",
- "comments_count": 0,
- "positive_reactions_count": 0,
- "public_reactions_count": 0,
- "page_views_count": 0,
- "published_timestamp": "2019-08-24T14:15:22Z",
- "body_markdown": "string",
- "user": {
- "user_id": 0,
- "name": "string",
- "username": "string",
- "twitter_username": "string",
- "github_username": "string",
- "website_url": "string",
- "profile_image": "string",
- "profile_image_90": "string"
}, - "reading_time_minutes": 0,
- "organization": {
- "name": "string",
- "username": "string",
- "slug": "string",
- "profile_image": "string",
- "profile_image_90": "string"
}, - "flare_tag": {
- "name": "string",
- "bg_color_hex": "string",
- "text_color_hex": "string"
}
}
]
A user
This endpoint allows the client to retrieve a single user, either by id or by the user's username
path Parameters
id required | string Example: 1 Id of the user. It can be either of the following two values:
|
query Parameters
url | string Example: url=ben Username of the user |
Responses
Request samples
- curl (by id)
- curl (by username)
curl https://dev.to/api/users/1
Response samples
- 200
- 404
{- "type_of": "user",
- "id": 1234,
- "username": "bob",
- "name": "bob",
- "summary": "Hello, world",
- "twitter_username": "bob",
- "github_username": "bob",
- "website_url": null,
- "location": "New York",
- "joined_at": "Jan 1, 2017",
}
The authenticated user
This endpoint allows the client to retrieve information about the authenticated user
Authorizations:
Responses
Request samples
- curl
curl -H "api-key: API_KEY" https://dev.to/api/users/me
Response samples
- 200
- 401
{- "type_of": "user",
- "id": 1234,
- "username": "bob",
- "name": "bob",
- "summary": "Hello, world",
- "twitter_username": "bob",
- "github_username": "bob",
- "website_url": null,
- "location": "New York",
- "joined_at": "Jan 1, 2017",
}
Invites a user to the Forem Instance
This endpoint allows the client to trigger an invitation to the provided email address.
It requires a token from a user with super-admin
privileges.
Request Body schema: application/json
Details of the user to be invited
email required | string <email> |
name | string <name> |
Responses
Request samples
- Payload
- curl (invite user)
{- "email": "user@example.com",
- "name": "string"
}
Response samples
- 401
{- "error": "unauthorized",
- "status": 401
}
Articles with a video
This endpoint allows the client to retrieve a list of articles that are uploaded with a video.
It will only return published video articles ordered by descending popularity.
It supports pagination, each page will contain 24
articles by default.
query Parameters
page | integer <int32> >= 1 Default: 1 Pagination page. |
per_page | integer <int32> [ 1 .. 1000 ] Default: 24 Page size (the number of items to return per page). |
Responses
Request samples
- curl (all video articles)
curl https://dev.to/api/videos
Response samples
- 200
[- {
- "type_of": "video_article",
- "id": 273532,
- "path": "/devteam/basecs-depth-first-search-implementing-4kkl",
- "title": "BaseCS: Depth First Search Implementing",
- "user_id": 2882,
- "video_duration_in_minutes": "11:47",
- "user": {
- "name": "Vaidehi Joshi"
}
}
]
User or organization profile picture
This endpoint allows the client to retrieve a user or organization profile image information by its corresponding username
path Parameters
username required | string Example: diogoosorio Username of the user or organization |
Responses
Request samples
- curl
curl https://dev.to/api/profile_images/diogoosorio
Response samples
- 200
- 404
{- "type_of": "profile_image",
- "image_of": "user",
}