Follow a user

PUT /profiles/{username}/follow

Follow a user by username

Path parameters

  • username string Required

    Username of the profile you want to follow

Responses

  • 200 application/json

    OK

    Hide response attribute Show response attribute object
  • Unauthorized

  • 422 application/json

    Unexpected error

    Hide response attribute Show response attribute object
    • errors object Required
      Hide errors attribute Show errors attribute object
PUT /profiles/{username}/follow
curl \
 --request PUT '/api/profiles/{username}/follow' \
 --header "Authorization: $API_KEY"
Response examples (200)
{
  "profile": {
    "bio": "I work at State Farm.",
    "image": "https://api.realworld.io/images/smiley-cyrus.jpg",
    "username": "jake",
    "following": false
  }
}
Response examples (422)
{
  "errors": {
    "body": [
      "string"
    ]
  }
}