Create Follow
curl --request POST \
--url https://api.replyke.com/api/v6/:projectId/users/:userId/followimport requests
url = "https://api.replyke.com/api/v6/:projectId/users/:userId/follow"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.replyke.com/api/v6/:projectId/users/:userId/follow', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.replyke.com/api/v6/:projectId/users/:userId/follow",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.replyke.com/api/v6/:projectId/users/:userId/follow"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.replyke.com/api/v6/:projectId/users/:userId/follow")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replyke.com/api/v6/:projectId/users/:userId/follow")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"followerId": "<string>",
"followedId": "<string>",
"createdAt": "<string>"
}User Follow Operations
Create Follow
Follow another user
POST
/
:projectId
/
users
/
:userId
/
follow
Create Follow
curl --request POST \
--url https://api.replyke.com/api/v6/:projectId/users/:userId/followimport requests
url = "https://api.replyke.com/api/v6/:projectId/users/:userId/follow"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.replyke.com/api/v6/:projectId/users/:userId/follow', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.replyke.com/api/v6/:projectId/users/:userId/follow",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.replyke.com/api/v6/:projectId/users/:userId/follow"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.replyke.com/api/v6/:projectId/users/:userId/follow")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replyke.com/api/v6/:projectId/users/:userId/follow")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"followerId": "<string>",
"followedId": "<string>",
"createdAt": "<string>"
}Create a follow relationship between the authenticated user and another user. This establishes a one-way follow relationship where the authenticated user will follow the specified user.
Path Parameters
string
required
ID of the user to follow
Response
string
Unique identifier for the follow relationship
string
ID of the user who is following (current authenticated user)
string
ID of the user being followed
string
Timestamp when the follow relationship was created
Error Responses
Invalid User ID - 400 Bad Request
Invalid User ID - 400 Bad Request
{
"error": "Invalid or missing userId",
"code": "follow/invalid-user-id"
}
Self-Follow Attempt - 400 Bad Request
Self-Follow Attempt - 400 Bad Request
{
"error": "Cannot follow yourself",
"code": "follow/self-follow"
}
User Not Found - 404 Not Found
User Not Found - 404 Not Found
{
"error": "User not found",
"code": "follow/user-not-found"
}
Already Following - 409 Conflict
Already Following - 409 Conflict
{
"error": "Already following this user",
"code": "follow/already-following"
}
Server Error - 500 Internal Server Error
Server Error - 500 Internal Server Error
{
"error": "Internal server error",
"code": "follow/server-error"
}
Notes
- This endpoint creates a
Followrelationship in the database - Follows are one-way relationships that do not require approval
- Users cannot follow themselves
- Duplicate follow requests return a 409 status
- Rate limiting: 75 requests per 5 minutes

