---
title: Add member
slug: organization-api/add-member
docTags: 
createdAt: 2024-07-01T11:14:05.780Z
---

{
  "id": "WvkPz561DP3gY2r1zgkJl",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.catenda.com/v2/orgs/{organization-id}/members",
    "servers": [
      {
        "url": "https://api.catenda.com/v2/orgs/{organization-id}/members"
      }
    ],
    "name": "Add member",
    "description": "Add an organization member.\n\nThe current user must be an owner of the organization.\n",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "organization-id",
          "type": "string",
          "description": "Id of the organization"
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "schema": [
            {
              "name": "user",
              "kind": "required",
              "type": "string",
              "description": "Id of the user",
              "example": "697t0czc8f74614096c758dr15dc6512"
            },
            {
              "name": "role",
              "kind": "required",
              "type": "string<owner | member>",
              "description": "Role of the member, valid values are:\n  - owner\n  - member\n",
              "example": "member"
            }
          ],
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "Bearer",
          "name": "Bearer",
          "kind": "optional",
          "type": "http",
          "scheme": "bearer"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "member",
            "schema": [
              {
                "name": "role",
                "kind": "optional",
                "type": "string<owner | administrator | member>",
                "description": "Valid values are:\n  - owner\n  - administrator\n  - member\n",
                "example": "member"
              },
              {
                "name": "user",
                "kind": "optional",
                "type": "object",
                "description": "Represents a User, Organization or Team.\n\nA User is someone with a Catenda account, commonly representing a person.\n\nAn Organization represents a company, project organization or an application. Organizations do not have a username and cannot sign in to Catenda.\n\nA Team represents a group of users within a project. Teams do not have a username and cannot sign in to Catenda.\n",
                "modelRef": "#/components/schemas/user",
                "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": "The name of the user, limited to 128 characters",
                    "example": "John Doe"
                  },
                  {
                    "name": "username",
                    "kind": "optional",
                    "type": "string",
                    "description": "The handle the user identifies with. \n\nCommonly 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.\n\nIf the user represents an organization or a team the value is always null.\n\nLimited to 50 characters.\n",
                    "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": "The type of user, valid values are:\n  - user\n  - organization\n  - team\n",
                    "example": "user"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/member",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "JnF94YVLkoOV2wnEyUhdy",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.catenda.com/v2/orgs/{organization-id}/members \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"user\": \"697t0czc8f74614096c758dr15dc6512\",\n     \"role\": \"member\"\n     }'"
        },
        {
          "id": "w-THhNq-k8ZEtqaouOwVz",
          "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   \"user\": \"697t0czc8f74614096c758dr15dc6512\",\n   \"role\": \"member\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.catenda.com/v2/orgs/{organization-id}/members\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "ALCeu9afnfgNunYiiGuSa",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.catenda.com/v2/orgs/{organization-id}/members\")\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   \"user\": \"697t0czc8f74614096c758dr15dc6512\",\n   \"role\": \"member\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "R7ESMMFMHzK-_Sfh0BKw2",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.catenda.com/v2/orgs/{organization-id}/members\"\n\npayload = json.dumps({\n   \"user\": \"697t0czc8f74614096c758dr15dc6512\",\n   \"role\": \"member\"\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": "JnF94YVLkoOV2wnEyUhdy"
    },
    "results": {
      "languages": [
        {
          "id": "5nmdDS_XfFk4fDCEWuUdw",
          "language": "200",
          "code": "// OK\n{\n  \"role\": \"member\",\n  \"user\": {\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  }\n}"
        }
      ],
      "selectedLanguageId": "5nmdDS_XfFk4fDCEWuUdw"
    }
  },
  "children": [
    {
      "id": "9eAzTdldh3k-TnDwVUDYJ",
      "type": "paragraph",
      "children": [
        {
          "text": "Add an organization member."
        }
      ]
    },
    {
      "id": "lDJ8SDha6awgsDh5O25m3",
      "type": "paragraph",
      "children": [
        {
          "text": "The current user must be an owner of the organization."
        }
      ]
    }
  ]
}