Dev

Forem API V1

Access Forem articles, users and other resources via API. For a real-world example of Forem in action, check out [DEV](https://www.dev.to). All endpoints can…

Social#openapi#social

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

Access Forem articles, users and other resources via API.
For a real-world example of Forem in action, check out DEV.
All endpoints can be accessed with the 'api-key' header and a accept header, but
some of them are accessible publicly without authentication.

Dates and date times, unless otherwise specified, must be in
the RFC 3339 format.

Endpoints 40

users

  • POSTInvite a User/api/admin/usersThis endpoint allows the client to trigger an invitation to the provided email address. It requires a token from a user with super_admin privileges.
  • GETThe authenticated user/api/users/meThis endpoint allows the client to retrieve information about the authenticated user
  • GETA User/api/users/:idThis endpoint allows the client to retrieve a single user, either by id or by the user's username. For complete documentation, see the v0 API docs:…
  • PUTSuspend a User/api/users/:id/suspendThis endpoint allows the client to suspend a user. The user associated with the API key must have any 'admin' or 'moderator' role. This specified user will be…
  • PUTUnpublish a User's Articles and Comments/api/users/:id/unpublishThis endpoint allows the client to unpublish all of the articles and comments created by a user. The user associated with the API key must have any 'admin' or…

articles

  • GETPublished articles/api/articles?page=1&per_page=30&tag=discuss&tags=javascript, css&tags_exclude=node, java&username=ben&state=fresh&top=2&collection_id=99This 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…
  • POSTPublish article/api/articlesThis 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…
  • GETPublished articles sorted by published date/api/articles/latest?page=1&per_page=30This endpoint allows the client to retrieve a list of articles. ordered by descending publish date. It supports pagination, each page will contain 30 articles…
  • GETUser's articles/api/articles/me?page=1&per_page=30This 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…
  • GETUser's all articles/api/articles/me/all?page=1&per_page=30This 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…
  • GETUser's published articles/api/articles/me/published?page=1&per_page=30This 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…
  • GETUser's unpublished articles/api/articles/me/unpublished?page=1&per_page=30This 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…
  • GETPublished article by id/api/articles/:idThis endpoint allows the client to retrieve a single published article given its id.
  • PUTUpdate an article by id/api/articles/:idThis 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…
  • PUTUnpublish an article/api/articles/:id/unpublish?note=Admin requested unpublishing all articles via APIThis endpoint allows the client to unpublish an article. The user associated with the API key must have any 'admin' or 'moderator' role. The article will be…
  • GETPublished article by path/api/articles/:username/:slugThis endpoint allows the client to retrieve a single published article given its path.

comments

  • GETComments/api/comments?a_id=321&p_id=321This endpoint allows the client to retrieve all comments belonging to an article or podcast episode as threaded conversations. It will return the all top…
  • GETComment by id/api/comments/:idThis 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…

display ads

  • GETdisplay ads/api/display_adsThis endpoint allows the client to retrieve a list of all display ads.
  • POSTdisplay ads/api/display_adsThis endpoint allows the client to create a new display ad.
  • GETdisplay ad/api/display_ads/:idThis endpoint allows the client to retrieve a single display ad, via its id.
  • PUTdisplay ads/api/display_ads/:idThis endpoint allows the client to update the attributes of a single display ad, via its id.
  • PUTunpublish/api/display_ads/:id/unpublishThis endpoint allows the client to remove a display ad from rotation by un-publishing it.

followers

  • GETFollowers/api/followers/users?page=1&per_page=30&sort=created_atThis 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…

followed_tags

  • GETFollowed Tags/api/follows/tagsThis endpoint allows the client to retrieve a list of the tags they follow.

organizations

  • GETAn organization/api/organizations/:usernameThis endpoint allows the client to retrieve a single organization by their username
  • GETOrganization's Articles/api/organizations/:username/articles?page=1&per_page=30This endpoint allows the client to retrieve a list of Articles belonging to the organization It supports pagination, each page will contain 30 users by default.
  • GETOrganization's users/api/organizations/:username/users?page=1&per_page=30This 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.

pages

  • GETshow details for all pages/api/pagesThis endpoint allows the client to retrieve details for all Page objects.
  • POSTpages/api/pagesThis endpoint allows the client to create a new page.
  • GETshow details for a page/api/pages/:idThis endpoint allows the client to retrieve details for a single Page object, specified by ID.
  • PUTupdate details for a page/api/pages/:idThis endpoint allows the client to retrieve details for a single Page object, specified by ID.
  • DELETEremove a page/api/pages/:idThis endpoint allows the client to delete a single Page object, specified by ID.

podcast_episodes

  • GETPodcast Episodes/api/podcast_episodes?page=1&per_page=30&username=codenewbieThis endpoint allows the client to retrieve a list of podcast episodes. "Podcast episodes" are episodes belonging to podcasts. It will only return active…

profile images

  • GETA Users or organizations profile image/api/profile_images/:usernameThis endpoint allows the client to retrieve a user or organization profile image information by its corresponding username.

reactions

  • POSTcreate reaction/api/reactions?category=like&reactable_id=0&reactable_type=CommentThis endpoint allows the client to create a reaction to a specified reactable (eg, Article, Comment, or User). For examples: * "Like"ing an Article will…
  • POSTtoggle reaction/api/reactions/toggle?category=like&reactable_id=0&reactable_type=CommentThis endpoint allows the client to toggle the user's reaction to a specified reactable (eg, Article, Comment, or User). For examples: * "Like"ing an Article…

readinglist

  • GETReadinglist/api/readinglist?page=1&per_page=30This endpoint allows the client to retrieve a list of articles that were saved to a Users readinglist. It supports pagination, each page will contain 30…

tags

  • GETTags/api/tags?page=1&per_page=10This endpoint allows the client to retrieve a list of tags that can be used to tag articles. It will return tags ordered by popularity. It supports…

videos

  • GETArticles with a video/api/videos?page=1&per_page=24This 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…

API details

Base URL
https://dev.to/api
Authentication
An API key in the api-key header
Operations
40 operations on 33 pathsGET 26PUT 7POST 6DELETE 1
Main resources
articles 13users 10display ads 5pages 5organizations 3comments 2reactions 2tags 2followed_tags 1followers 1
Response formats
application/json
Description format
OpenAPI 3.0.3, API version 1.0.0
Listed from
APIs.guru OpenAPI Directory (CC0-1.0)
Source updated

How to test the Forem API V1 in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Forem API V1 collection, without the publisher's secrets.
  3. Add your credentialsThis API uses an API key in the api-key header. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “Invite a User” (POST /api/admin/users), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Forem API V1?

Access Forem articles, users and other resources via API. For a real-world example of Forem in action, check out [DEV](https://www.dev.to). All endpoints can… It is listed under Social and has 40 endpoints.

Who publishes the Forem API V1?

It is listed from Dev's public API description (an OpenAPI document), not published by Dev on Swastik Codes. Anyone who controls dev.to can claim the profile by adding a DNS TXT record.

What is the base URL of the Forem API V1?

Requests go to https://dev.to/api. Endpoint paths are added to this base URL.

How do I authenticate with the Forem API V1?

With an API key in the api-key header.

How many endpoints does the Forem API V1 have?

40 operations on 33 paths (26 GET, 7 PUT, 6 POST, 1 DELETE). The largest groups are articles, users, display ads, pages.

Is forking the Forem API V1 free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.