curl --request POST \
--url https://api.example.com/api/follow \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"username": "<string>"
}
'{
"200": {},
"400": {},
"401": {},
"404": {},
"message": "<string>"
}Follow a user
curl --request POST \
--url https://api.example.com/api/follow \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"username": "<string>"
}
'{
"200": {},
"400": {},
"401": {},
"404": {},
"message": "<string>"
}{
"message": "now following {username}"
}
{
"error": "missing fields"
}
{
"error": "already following"
}
{
"error": "unauthorized"
}
{
"error": "user not found"
}
curl -X POST https://api.example.com/api/follow \
-H "Authorization: your-auth-token" \
-H "Content-Type: application/json" \
-d '{
"username": "johndoe"
}'
{
"message": "now following johndoe"
}