---
updatedAt: 2026-09-29T07:08:22.000Z
agentTools:
  projectIndex: https://docs.public-api.leexi.ai/llms.txt
---

# Update a client team

Update a team of a client company

Only the attributes present in the body are updated:

```json
{
    "name": "Sales Team EMEA"
}
```

A team can only be deactivated (`"active": false`) once it has no active users left — move them to another team first. Deactivating a team also removes it from the conversation type filters that reference it.

> 📘 Requires the `write_clients` permission scope on the API key of a reseller account.

> ❗️ A company that is not one of your clients, including your own reseller company, answers `404`.

# OpenAPI definition

```json
{
  "components": {
    "securitySchemes": {
      "sec0": {
        "description": "Send the API key signature as `Authorization: Basic <api_key_signature>`.",
        "in": "header",
        "name": "Authorization",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "title": "leexi-public-api",
    "version": "1.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/reseller/companies/{company_uuid}/teams/{uuid}": {
      "patch": {
        "description": "Update a team of a client company",
        "operationId": "update-a-client-team",
        "parameters": [
          {
            "description": "UUID of one of your client companies.",
            "in": "path",
            "name": "company_uuid",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "UUID of the team.",
            "in": "path",
            "name": "uuid",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "active": {
                    "description": "Defaults to `true` on creation. A team can only be deactivated once it has no active users.",
                    "type": "boolean"
                  },
                  "name": {
                    "description": "The team name. It must be unique within the client company.",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"success\": true,\n  \"data\": {\n    \"uuid\": \"5290728d-b3c4-4330-918d-d8f153e9500d\",\n    \"name\": \"Sales Team\",\n    \"active\": true,\n    \"created_at\": \"2024-06-14T11:00:33.534Z\",\n    \"updated_at\": \"2024-06-14T11:00:33.534Z\"\n  },\n  \"message\": \"Team successfully updated\"\n}"
                  }
                },
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "active": {
                          "example": true,
                          "type": "boolean"
                        },
                        "created_at": {
                          "example": "2024-06-14T11:00:33.534Z",
                          "type": "string"
                        },
                        "name": {
                          "example": "Sales Team",
                          "type": "string"
                        },
                        "updated_at": {
                          "example": "2024-06-14T11:00:33.534Z",
                          "type": "string"
                        },
                        "uuid": {
                          "example": "5290728d-b3c4-4330-918d-d8f153e9500d",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "message": {
                      "example": "Team successfully updated",
                      "type": "string"
                    },
                    "success": {
                      "example": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "200"
          },
          "401": {
            "description": "401"
          },
          "402": {
            "description": "402"
          },
          "403": {
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"success\": false,\n  \"message\": \"The API key has no write_clients access\"\n}"
                  }
                },
                "schema": {
                  "properties": {
                    "message": {
                      "example": "The API key has no write_clients access",
                      "type": "string"
                    },
                    "success": {
                      "example": false,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "403"
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"success\": false,\n  \"message\": \"Team not found\"\n}"
                  }
                },
                "schema": {
                  "properties": {
                    "message": {
                      "example": "Team not found",
                      "type": "string"
                    },
                    "success": {
                      "example": false,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "404"
          },
          "409": {
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"success\": false,\n  \"message\": \"A team with this name already exists\"\n}"
                  }
                },
                "schema": {
                  "properties": {
                    "message": {
                      "example": "A team with this name already exists",
                      "type": "string"
                    },
                    "success": {
                      "example": false,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "409"
          },
          "422": {
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"success\": false,\n  \"message\": \"Team still has active users\"\n}"
                  }
                },
                "schema": {
                  "properties": {
                    "message": {
                      "example": "Team still has active users",
                      "type": "string"
                    },
                    "success": {
                      "example": false,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "422"
          },
          "429": {
            "description": "429"
          }
        },
        "summary": "Update a client team",
        "x-internal": false
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "servers": [
    {
      "url": "https://public-api.leexi.ai/v1"
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "headers": [],
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```