---
title: "Follow or unfollow user"
method: POST
path: "/social-media/follow/{toBeFollowedUserId}"
tags: ["📸 Social Media"]
---

# Follow or unfollow user

`POST /social-media/follow/{toBeFollowedUserId}`

## Request

- Base URL: `https://api.freeapi.app/api/v1`
- URL: `https://api.freeapi.app/api/v1/social-media/follow/{toBeFollowedUserId}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/hiteshchoudhary-ssesph/apis/freeapi/docs/social-media/follow/:toBeFollowedUserId/post.ts> (a function with typed inputs; its response is checked against the schema)

The API endpoint allows users to follow or unfollow other users within the application.

When accessing this endpoint, users can choose to follow or unfollow a specific user, thereby establishing or severing a connection between their accounts.

## Response `200`

Follow or unfollow user

- object
  - `data` object
    - `following` boolean
  - `message` string
  - `statusCode` number
  - `success` boolean

---

[API](https://skmtc.dev/hiteshchoudhary-ssesph/apis/freeapi.md) - [All operations](https://skmtc.dev/hiteshchoudhary-ssesph/apis/freeapi/llms.txt) - [OpenAPI document](https://skmtc.dev/hiteshchoudhary-ssesph/apis/freeapi/revisions/a9f3a290e4dc?raw)
