openapi: 3.1.0 info: title: Dev.to Forem Articles Users API description: The Dev.to Forem API (v1) is a RESTful API that provides programmatic access to the Dev.to developer community platform, which is built on the open-source Forem framework. The API enables developers to create, read, update, and manage articles, comments, users, organizations, tags, followers, listings, podcast episodes, pages, display ads, reactions, reading lists, and webhooks. It uses API key authentication, requires an accept header of application/vnd.forem.api-v1+json, and returns JSON responses. Unauthenticated endpoints are CORS-enabled, making it possible to fetch public content directly from browser-based applications. version: 1.0.0 contact: name: Forem Support url: https://forem.com termsOfService: https://dev.to/terms servers: - url: https://dev.to/api description: Dev.to Production Server security: - apiKey: [] tags: - name: Users description: Endpoints for retrieving user profiles and managing user accounts. paths: /articles/me: get: operationId: getUserArticles summary: User's articles description: Retrieves all articles authored by the authenticated user. tags: - Users parameters: - $ref: '#/components/parameters/pageParam' - $ref: '#/components/parameters/perPageParam30to1000' responses: '200': description: A list of the authenticated user's articles content: application/json: schema: type: array items: $ref: '#/components/schemas/ArticleIndex' '401': description: Unauthorized /articles/me/published: get: operationId: getUserPublishedArticles summary: User's published articles description: Retrieves only published articles authored by the authenticated user. tags: - Users parameters: - $ref: '#/components/parameters/pageParam' - $ref: '#/components/parameters/perPageParam30to1000' responses: '200': description: A list of the authenticated user's published articles content: application/json: schema: type: array items: $ref: '#/components/schemas/ArticleIndex' '401': description: Unauthorized /articles/me/unpublished: get: operationId: getUserUnpublishedArticles summary: User's unpublished articles description: Retrieves only unpublished (draft) articles authored by the authenticated user. tags: - Users parameters: - $ref: '#/components/parameters/pageParam' - $ref: '#/components/parameters/perPageParam30to1000' responses: '200': description: A list of the authenticated user's unpublished articles content: application/json: schema: type: array items: $ref: '#/components/schemas/ArticleIndex' '401': description: Unauthorized /articles/me/all: get: operationId: getUserAllArticles summary: User's all articles description: Retrieves all articles (both published and unpublished) authored by the authenticated user. tags: - Users parameters: - $ref: '#/components/parameters/pageParam' - $ref: '#/components/parameters/perPageParam30to1000' responses: '200': description: A list of all the authenticated user's articles content: application/json: schema: type: array items: $ref: '#/components/schemas/ArticleIndex' '401': description: Unauthorized /organizations/{username}/users: get: operationId: getOrgUsers summary: Organization's users description: Retrieves a list of users belonging to the specified organization. tags: - Users security: [] parameters: - name: username in: path required: true schema: type: string description: The username (slug) of the organization. - $ref: '#/components/parameters/pageParam' - $ref: '#/components/parameters/perPageParam30to1000' responses: '200': description: A list of organization members content: application/json: schema: type: array items: $ref: '#/components/schemas/User' '404': description: Organization not found /users/me: get: operationId: getUserMe summary: The authenticated user description: Retrieves the profile of the currently authenticated user. tags: - Users responses: '200': description: The authenticated user's profile content: application/json: schema: $ref: '#/components/schemas/User' '401': description: Unauthorized /users/{id}: get: operationId: getUser summary: A User description: Retrieves a single user by their numeric ID. tags: - Users security: [] parameters: - name: id in: path required: true schema: type: string description: The ID of the user. responses: '200': description: The requested user content: application/json: schema: $ref: '#/components/schemas/User' '404': description: User not found /users/{id}/unpublish: put: operationId: unpublishUser summary: Unpublish a User's Articles and Comments description: Unpublishes all articles and comments for the specified user. Requires admin-level API key. tags: - Users parameters: - name: id in: path required: true schema: type: integer description: The ID of the user. responses: '204': description: User content unpublished successfully '401': description: Unauthorized '404': description: User not found /users/{id}/suspend: put: operationId: suspendUser summary: Suspend a User description: Suspends a user account. Requires admin-level API key. tags: - Users parameters: - name: id in: path required: true schema: type: integer description: The ID of the user. responses: '204': description: User suspended successfully '401': description: Unauthorized '404': description: User not found components: schemas: Organization: type: object description: An organization on the DEV platform that can publish articles and have members. properties: name: type: string description: The display name of the organization. username: type: string description: The unique username (slug) of the organization. slug: type: string description: The URL slug of the organization. profile_image: type: string format: uri description: The URL of the organization's profile image. profile_image_90: type: string format: uri description: The URL of the 90px profile image. ArticleIndex: type: object description: A summary article object returned in list endpoints, with fewer fields than the full article representation. properties: type_of: type: string description: The type of resource, always "article". id: type: integer description: The unique identifier of the article. title: type: string description: The title of the article. description: type: string description: A short description or subtitle for the article. readable_publish_date: type: string description: The publish date in a human-readable format. slug: type: string description: The URL slug of the article. path: type: string description: The relative path to the article on DEV. url: type: string format: uri description: The full URL of the article. comments_count: type: integer description: The number of comments on the article. public_reactions_count: type: integer description: The total number of public reactions. collection_id: type: integer nullable: true description: The ID of the collection (series) the article belongs to. published_timestamp: type: string format: date-time description: The ISO 8601 timestamp when the article was published. positive_reactions_count: type: integer description: The count of positive reactions. cover_image: type: string format: uri nullable: true description: The URL of the article's cover image. social_image: type: string format: uri description: The URL of the social sharing image. canonical_url: type: string format: uri description: The canonical URL of the article. created_at: type: string format: date-time description: The ISO 8601 timestamp when the article was created. reading_time_minutes: type: integer description: The estimated reading time in minutes. tag_list: type: array items: type: string description: A list of tags associated with the article. tags: type: string description: A comma-separated string of tags. user: $ref: '#/components/schemas/User' organization: $ref: '#/components/schemas/Organization' User: type: object description: A user account on the DEV platform. properties: name: type: string description: The display name of the user. username: type: string description: The unique username of the user. twitter_username: type: string nullable: true description: The user's Twitter username. github_username: type: string nullable: true description: The user's GitHub username. user_id: type: integer description: The unique numeric ID of the user. website_url: type: string format: uri nullable: true description: The user's website URL. location: type: string nullable: true description: The user's location. summary: type: string nullable: true description: A brief bio or summary of the user. profile_image: type: string format: uri description: The URL of the user's profile image. profile_image_90: type: string format: uri description: The URL of the 90px profile image. joined_at: type: string format: date-time description: The ISO 8601 timestamp when the user joined. parameters: pageParam: name: page in: query schema: type: integer minimum: 1 default: 1 description: Pagination page number. perPageParam30to1000: name: per_page in: query schema: type: integer minimum: 1 maximum: 1000 default: 30 description: Number of items per page (max 1000, default 30). securitySchemes: apiKey: type: apiKey in: header name: api-key description: API key obtained from the DEV.to settings page. Pass in the api-key header for authenticated requests. externalDocs: description: Forem API V1 Documentation url: https://developers.forem.com/api/v1