Skip to main content

POST /api/users/[id]/follow

Follow a user.
Requires authentication. Cannot follow yourself.

Response (201)

{
  "message": "Successfully followed user",
  "isFollowing": true
}

DELETE /api/users/[id]/follow

Unfollow a user.

Response (200)

{
  "message": "Successfully unfollowed user",
  "isFollowing": false
}

Errors

StatusCodeReason
400VALIDATION_ERRORCannot follow yourself
401UNAUTHORIZEDNot authenticated
404NOT_FOUNDUser not found