---
title: Update teams
slug: project-api/update-teams
docTags: 
createdAt: 2025-06-18T14:13:44.219Z
---

{
  "id": "2KhGCPxd9e3DR5bk1sL36",
  "type": "api-oas-v2",
  "data": {
    "method": "PATCH",
    "url": "https://api.catenda.com/v2/projects/{project-id}/teams/batch",
    "servers": [
      {
        "url": "https://api.catenda.com/v2/projects/{project-id}/teams/batch"
      }
    ],
    "name": "Update teams",
    "description": "Update members and roles of project teams.\n\nThe current user must be a project administrator.\n",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "project-id",
          "type": "string",
          "example": "af2d8af0fa54465b89bf26dd3d92cfd0",
          "description": "Catenda project id"
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "schema": [
            {
              "name": "teamsToUpdate",
              "kind": "required",
              "type": "array",
              "description": "Ids of the teams to update",
              "example": "",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "a7c3e386a53048fb93a211f2995de797",
              "itemDefault": ""
            },
            {
              "name": "role",
              "kind": "optional",
              "type": "string<administrator | member>",
              "description": "Role of the team, valid values are:\n  - administrator\n  - member\n",
              "example": ""
            },
            {
              "name": "usersToAdd",
              "kind": "optional",
              "type": "array",
              "description": "Ids of the users to add to the teams",
              "example": "",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "524809076a694255b989d236517a55da",
              "itemDefault": ""
            },
            {
              "name": "usersToRemove",
              "kind": "optional",
              "type": "array",
              "description": "Ids of the users to remove from the teams",
              "example": "",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "973763399e2147dceg4a4a0661e03a26",
              "itemDefault": ""
            }
          ],
          "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": "array",
            "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",
            "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/user",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "iqLm_-5eS5MGbcUXh-R8w",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PATCH \\\n     --url https://api.catenda.com/v2/projects/{project-id}/teams/batch \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"teamsToUpdate\": []\n     }'"
        },
        {
          "id": "zLBgMUpLoZ-oRiSGUZ7Xf",
          "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   \"teamsToUpdate\": []\n});\n\nvar requestOptions = {\n   method: 'PATCH',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.catenda.com/v2/projects/{project-id}/teams/batch\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "yGlyxTk3tU3vSLQ8vajQb",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.catenda.com/v2/projects/{project-id}/teams/batch\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Patch.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"teamsToUpdate\": []\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "02B4_rwqcwQxI61pp1I2u",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.catenda.com/v2/projects/{project-id}/teams/batch\"\n\npayload = json.dumps({\n   \"teamsToUpdate\": []\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PATCH\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "iqLm_-5eS5MGbcUXh-R8w"
    },
    "results": {
      "languages": [
        {
          "id": "LC7ZGPme9RWqWzXBtDER_",
          "language": "200",
          "code": "// OK\n[\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  }\n]"
        }
      ],
      "selectedLanguageId": "LC7ZGPme9RWqWzXBtDER_"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}