users

Suspend a user's account.

Suspension Details:

  • The user associated with the API key must have an admin or moderator role.
  • Assigns the suspended role to the user, preventing them from posting new content (articles or comments) while suspended.
  • Existing content is not deleted.
  • Suspended users are not notified in the UI; if you want them to know, you must notify them explicitly.
put/api/users/{id}/suspend

Request

  • Base URL
    https://dev.to
  • Auth
    • API key in header api-key
    • or HTTP bearer

Path parameters

idinteger required

The unique ID of the user to suspend.

Response

User successfully unpublished

Changes

    • breaking

      removed the media type application/json for the response with the status

    • breaking

      removed the media type application/json for the response with the status

    • info

      added the media type application/json for the response with the status

    • info

      added the media type application/json for the response with the status