---
title: Add follower
slug: document-api/add-follower
docTags: 
createdAt: 2025-10-20T09:39:14.636Z
---

{
  "id": "YbWzFxYt0rXdeANdv68gQ",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.catenda.com/v2/projects/{project-id}/libraries/collections/{collection-id}/followers",
    "servers": [
      {
        "url": "https://api.catenda.com/v2/projects/{project-id}/libraries/collections/{collection-id}/followers"
      }
    ],
    "name": "Add follower",
    "description": "Add a new follower to a document library item collection.\n\nPrivate collections can only have collection owner as a follower. If the collection is shared at the project level users can add themselves as a follower. Collection owners and administrators can add any user as a follower.\n",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "project-id",
          "type": "string",
          "example": "af2d8af0fa54465b89bf26dd3d92cfd0",
          "description": "Catenda project id"
        },
        {
          "kind": "required",
          "name": "collection-id",
          "type": "string",
          "description": "Id of the document library item collection"
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "schema": [
            {
              "name": "userId",
              "kind": "required",
              "type": "string",
              "description": "Id of the user to follow the collection.",
              "example": "524809076a694255b989d236517a55da"
            }
          ],
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "Bearer",
          "name": "Bearer",
          "kind": "optional",
          "type": "http",
          "scheme": "bearer"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>Represents a User, Organization or Team.</p>\n<p>A User is someone with a Catenda account, commonly representing a person.</p>\n<p>An Organization represents a company, project organization or an application. Organizations do not have a username and cannot sign in to Catenda.</p>\n<p>A Team represents a group of users within a project. Teams do not have a username and cannot sign in to Catenda.</p>",
            "customType": "user",
            "schema": [
              {
                "name": "id",
                "kind": "optional",
                "type": "string",
                "description": "Represented as compacted UUID using 32 hexadecimal characters",
                "example": "524809076a694255b989d236517a55da"
              },
              {
                "name": "name",
                "kind": "optional",
                "type": "string",
                "description": "<p>The name of the user, limited to 128 characters</p>",
                "example": "John Doe"
              },
              {
                "name": "username",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "<p>The handle the user identifies with.</p>\n<p>Commonly the username will be in email address format. Usernames are unique but subject to change, we recommend using the id field to reference users instead.</p>\n<p>If the user represents an organization or a team the value is always null.</p>\n<p>Limited to 50 characters.</p>",
                "example": "john@doe.com"
              },
              {
                "name": "email",
                "kind": "optional",
                "type": "string",
                "description": "Email address of the User",
                "example": "john@doe.com"
              },
              {
                "name": "createdAt",
                "kind": "optional",
                "type": "string",
                "description": "The date and time the user was created in ISO 8601 format",
                "example": "2016-09-20T14:55:22.000Z"
              },
              {
                "name": "avatarUrl",
                "kind": "optional",
                "type": "string",
                "description": "The URL for the user avatar",
                "example": "https://api.catenda.com/v2/avatar/397t0ccd8f74516096c738de15dc6512"
              },
              {
                "name": "type",
                "kind": "optional",
                "type": "string<user | organization | team>",
                "description": "<p>The type of user, valid values are:</p>\n<ul>\n<li>user</li>\n<li>organization</li>\n<li>team</li>\n</ul>",
                "example": "user",
                "enum": [
                  "user",
                  "organization",
                  "team"
                ]
              }
            ],
            "modelRef": "#/components/schemas/user",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "gYqujxQVN5DN4XOk_Jmep",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.catenda.com/v2/projects/{project-id}/libraries/collections/{collection-id}/followers \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"userId\": \"524809076a694255b989d236517a55da\"\n     }'"
        },
        {
          "id": "-FM2GoLfbEf3jvh6HS7CP",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"userId\": \"524809076a694255b989d236517a55da\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.catenda.com/v2/projects/{project-id}/libraries/collections/{collection-id}/followers\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "yTLTmadvJA2cX7ATYrcYo",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.catenda.com/v2/projects/{project-id}/libraries/collections/{collection-id}/followers\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"userId\": \"524809076a694255b989d236517a55da\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "PRW3pZm9w-VQvOjcfhDVR",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.catenda.com/v2/projects/{project-id}/libraries/collections/{collection-id}/followers\"\n\npayload = json.dumps({\n   \"userId\": \"524809076a694255b989d236517a55da\"\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "gYqujxQVN5DN4XOk_Jmep"
    },
    "results": {
      "languages": [
        {
          "id": "hryisHSOGoNaFtW4BTaxE",
          "language": "200",
          "code": "// OK\n{\n  \"id\": \"524809076a694255b989d236517a55da\",\n  \"name\": \"John Doe\",\n  \"username\": \"john@doe.com\",\n  \"email\": \"john@doe.com\",\n  \"createdAt\": \"2016-09-20T14:55:22.000Z\",\n  \"avatarUrl\": \"https://api.catenda.com/v2/avatar/397t0ccd8f74516096c738de15dc6512\",\n  \"type\": \"user\"\n}"
        }
      ],
      "selectedLanguageId": "hryisHSOGoNaFtW4BTaxE"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}