---
title: Update team
slug: project-api/update-team
docTags: 
createdAt: 2024-06-10T16:48:55.567Z
---

{
  "id": "FTZgUtIjJPcOmEVudZLYr",
  "type": "api-oas-v2",
  "data": {
    "method": "PATCH",
    "url": "https://api.catenda.com/v2/projects/{project-id}/teams/{team-id}",
    "servers": [
      {
        "url": "https://api.catenda.com/v2/projects/{project-id}/teams/{team-id}"
      }
    ],
    "name": "Update team",
    "description": "Update project membership for the team.\n\nThe current user must be a project administrator.\n\nThe members of the team will receive any updated roles.\n",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "project-id",
          "type": "string",
          "example": "af2d8af0fa54465b89bf26dd3d92cfd0",
          "description": "Catenda project id"
        },
        {
          "kind": "required",
          "name": "team-id",
          "type": "string",
          "description": "Id of the team"
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "schema": [
            {
              "name": "name",
              "kind": "optional",
              "type": "string",
              "description": "The name of the team",
              "example": "Team name"
            },
            {
              "name": "role",
              "kind": "optional",
              "type": "string<administrator | member>",
              "description": "Role of the team, valid values are:\n  - administrator\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
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "ZVPNX-p36SOh_aCoq9deg",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PATCH \\\n     --url https://api.catenda.com/v2/projects/{project-id}/teams/{team-id} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "H-yJfOzMeqhoWMD8rEx0X",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'PATCH',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.catenda.com/v2/projects/{project-id}/teams/{team-id}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "RMQOkCm6r8WXqrGXv2lR1",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.catenda.com/v2/projects/{project-id}/teams/{team-id}\")\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\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "5GWOLntSAIjvaOPfYgoNq",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.catenda.com/v2/projects/{project-id}/teams/{team-id}\"\n\npayload = {}\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": "ZVPNX-p36SOh_aCoq9deg"
    },
    "results": {
      "languages": [
        {
          "id": "vBRsr5VmbFDjfGCAqAB2j",
          "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": "vBRsr5VmbFDjfGCAqAB2j"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}