Skip to main content
POST
/
:projectId
/
api
/
v7
/
users
/
:userId
/
follow
Follow User
curl --request POST \
  --url https://api.replyke.com/api/v6/:projectId/api/v7/users/:userId/follow
{
  "id": "<string>",
  "followerId": "<string>",
  "followedId": "<string>",
  "createdAt": "<string>"
}
Creates a follow relationship from the authenticated user to the specified user. A notification is sent to the followed user.

Path Parameters

userId
string
required
The Replyke user ID (UUID) of the user to follow.

Response

On success, returns HTTP 201 with the created follow record:
id
string
Unique follow record ID (UUID).
followerId
string
ID of the user who followed (the authenticated user).
followedId
string
ID of the user being followed.
createdAt
string
ISO timestamp of when the follow was created.

Error Responses

{
  "error": "A user cannot follow themselves.",
  "code": "follow/self-follow"
}
{
  "error": "One or both users involved in the follow do not exist.",
  "code": "follow/user-not-found"
}
{
  "error": "Follow relationship already exists.",
  "code": "follow/already-exists"
}

See Also