APIHub
Back to Explore

Forem API V1

Forem API V1 provides programmatic access to the main resources of a Forem community, allowing you to create, retrieve, update, and manage articles, comments, podcasts, videos, tags, organizations, users, reactions, follows, followers, display ads, and static pages, as well as perform actions such as publishing/unpublishing content and suspending users.

Social
apiKeyHeader
HTTPS
CORS: Unknown
Description enriched
Visit official documentation

Latency

210ms p95

Uptime

100.0% 30d

Playground

Verified

live

Endpoints

REST · JSON
POST

/api/admin/users

Invite a User

GET

/api/articles

Published articles

  • page (query, page) — Pagination page
  • per_page (query, limit) — Page size (the number of items to return per page). The default maximum value can be overridden by "API_PER_PAGE_MAX" environment variable.
  • tag (query) — 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`.
  • tags (query) — Using this parameter will retrieve articles with any of the comma-separated tags. Articles will be ordered by descending popularity.
  • tags_exclude (query) — Using this parameter will retrieve articles that do _not_ contain _any_ of comma-separated tags. Articles will be ordered by descending popularity.
  • username (query) — Using this parameter will retrieve articles belonging to a User or Organization ordered by descending publication date. If `state=all` the number of items returned will be `1000` instead of the default `30`. This parameter can be used in conjuction with `state`.
  • state (query) — Using this parameter will allow the client to check which articles are fresh or rising. If `state=fresh` the server will return fresh articles. If `state=rising` the server will return rising articles. This param can be used in conjuction with `username`, only if set to `all`.
  • top (query, limit) — 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`.
  • collection_id (query) — Adding this will allow the client to return the list of articles belonging to the requested collection, ordered by ascending publication date.
POST

/api/articles

Publish article

GET

/api/articles/latest

Published articles sorted by published date

  • page (query, page) — Pagination page
  • per_page (query, limit) — Page size (the number of items to return per page). The default maximum value can be overridden by "API_PER_PAGE_MAX" environment variable.
GET

/api/articles/me

User's articles

  • page (query, page) — Pagination page
  • per_page (query, limit) — Page size (the number of items to return per page). The default maximum value can be overridden by "API_PER_PAGE_MAX" environment variable.
GET

/api/articles/me/all

User's all articles

  • page (query, page) — Pagination page
  • per_page (query, limit) — Page size (the number of items to return per page). The default maximum value can be overridden by "API_PER_PAGE_MAX" environment variable.
GET

/api/articles/me/published

User's published articles

  • page (query, page) — Pagination page
  • per_page (query, limit) — Page size (the number of items to return per page). The default maximum value can be overridden by "API_PER_PAGE_MAX" environment variable.
GET

/api/articles/me/unpublished

User's unpublished articles

  • page (query, page) — Pagination page
  • per_page (query, limit) — Page size (the number of items to return per page). The default maximum value can be overridden by "API_PER_PAGE_MAX" environment variable.
GET

/api/articles/{id}

Published article by id

  • id (path, required)
PUT

/api/articles/{id}

Update an article by id

  • id (path, required) — The ID of the user to unpublish.
PUT

/api/articles/{id}/unpublish

Unpublish an article

  • id (path, required) — The ID of the article to unpublish.
  • note (query) — Content for the note that's created along with unpublishing
GET

/api/articles/{username}/{slug}

Published article by path

  • username (path, required)
  • slug (path, required)
GET

/api/comments

Comments

  • a_id (query) — Article identifier.
  • p_id (query) — Podcast Episode identifier.
GET

/api/comments/{id}

Comment by id

  • id (path, required) — Comment identifier.
GET

/api/display_ads

display ads

POST

/api/display_ads

display ads

GET

/api/display_ads/{id}

display ad

  • id (path, required) — The ID of the user to unpublish.
PUT

/api/display_ads/{id}

display ads

  • id (path, required) — The ID of the user to unpublish.
PUT

/api/display_ads/{id}/unpublish

unpublish

  • id (path, required) — The ID of the user to unpublish.
GET

/api/followers/users

Followers

  • page (query, page) — Pagination page
  • per_page (query, limit) — Page size (the number of items to return per page). The default maximum value can be overridden by "API_PER_PAGE_MAX" environment variable.
  • sort (query) — Default is 'created_at'. Specifies the sort order for the created_at param of the follow relationship. To sort by newest followers first (descending order) specify ?sort=-created_at.
GET

/api/follows/tags

Followed Tags

GET

/api/organizations/{username}

An organization

  • username (path, required)
GET

/api/organizations/{username}/articles

Organization's Articles

  • username (path, required)
  • page (query, page) — Pagination page
  • per_page (query, limit) — Page size (the number of items to return per page). The default maximum value can be overridden by "API_PER_PAGE_MAX" environment variable.
GET

/api/tags

Tags

  • page (query, page) — Pagination page
  • per_page (query, limit) — Page size (the number of items to return per page). The default maximum value can be overridden by "API_PER_PAGE_MAX" environment variable.
GET

/api/organizations/{username}/users

Organization's users

  • username (path, required)
  • page (query, page) — Pagination page
  • per_page (query, limit) — Page size (the number of items to return per page). The default maximum value can be overridden by "API_PER_PAGE_MAX" environment variable.
GET

/api/pages

show details for all pages

POST

/api/pages

pages

DELETE

/api/pages/{id}

remove a page

  • id (path, required) — The ID of the page.
GET

/api/pages/{id}

show details for a page

  • id (path, required) — The ID of the page.
PUT

/api/pages/{id}

update details for a page

  • id (path, required) — The ID of the page.
GET

/api/podcast_episodes

Podcast Episodes

  • page (query, page) — Pagination page
  • per_page (query, limit) — Page size (the number of items to return per page). The default maximum value can be overridden by "API_PER_PAGE_MAX" environment variable.
  • username (query) — Using this parameter will retrieve episodes belonging to a specific podcast.
GET

/api/profile_images/{username}

A Users or organizations profile image

  • username (path, required) — The parameter is the username of the user or the username of the organization.
POST

/api/reactions

create reaction

  • category (query, required)
  • reactable_id (query, required)
  • reactable_type (query, required)
POST

/api/reactions/toggle

toggle reaction

  • category (query, required)
  • reactable_id (query, required)
  • reactable_type (query, required)
GET

/api/readinglist

Readinglist

  • page (query, page) — Pagination page
  • per_page (query, limit) — Page size (the number of items to return per page). The default maximum value can be overridden by "API_PER_PAGE_MAX" environment variable.
GET

/api/users/me

The authenticated user

GET

/api/users/{id}

A User

  • id (path, required)
PUT

/api/users/{id}/suspend

Suspend a User

  • id (path, required) — The ID of the user to suspend.
PUT

/api/users/{id}/unpublish

Unpublish a User's Articles and Comments

  • id (path, required) — The ID of the user to unpublish.
GET

/api/videos

Articles with a video

  • page (query, page) — Pagination page
  • per_page (query, limit) — Page size (the number of items to return per page). The default maximum value can be overridden by "API_PER_PAGE_MAX" environment variable.

40 endpoints auto-detected

Authentication

This API uses an API key, passed in the "api-key" header. No OAuth required.

curl -X POST \
  "https://dev.to/api/api/admin/users" \
  -H "api-key: YOUR_API_KEY"

dev.to · HTTPS only