POST /users/:id/follow

POST /users/{id}/follow

Follow a user

Path parameters

  • id integer(int64) Required

    ID of the resource to fetch

Responses

  • 200

    successful operation

    Hide response attribute Show response attribute object
    • data object
      Hide data attributes Show data attributes object
      • id integer
      • auth0_id string
      • username string
      • email string
      • user_type string
      • followed_by_count integer
      • following_count integer
      • supergroups array[string]
      • last_active string
      • followed_by_me boolean
  • 400

    Bad Request

  • 401

    Authorization information is missing or invalid.

  • 404

    User Not Found

  • 422

    Unprocessable Entity

  • 500

    Server Error

POST /users/{id}/follow
curl \
 -X POST https://api.cosmily.com/api/v1/users/{id}/follow \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "data": {
    "id": 42,
    "auth0_id": "string",
    "username": "string",
    "email": "string",
    "user_type": "string",
    "followed_by_count": 42,
    "following_count": 42,
    "supergroups": [
      "string"
    ],
    "last_active": "string",
    "followed_by_me": true
  }
}
Response examples (200)
{
  "data": {
    "id": 42,
    "auth0_id": "string",
    "username": "string",
    "email": "string",
    "user_type": "string",
    "followed_by_count": 42,
    "following_count": 42,
    "supergroups": [
      "string"
    ],
    "last_active": "string",
    "followed_by_me": true
  }
}