> ## Documentation Index
> Fetch the complete documentation index at: https://docs.camposcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# /v1/teams/{teamId}

> This endpoint renames a team by its ID.



## OpenAPI

````yaml PUT /v1/teams/{teamId}
openapi: 3.1.0
info:
  title: CamposCloud API Documentation
  description: >-
    This documentation provides an overview of the CamposCloud API, including
    authentication, endpoints, and data structures. It is designed to help
    developers integrate with the CamposCloud platform effectively.
  version: 1.0.0
servers:
  - url: https://api.camposcloud.com
security:
  - bearerAuth: []
paths:
  /v1/teams/{teamId}:
    put:
      tags:
        - Teams
      description: Renames a team. Only the owner of the team can do this.
      parameters:
        - name: teamId
          in: path
          required: true
          description: ID of the team to update
          schema:
            type: string
      requestBody:
        description: Team data to update
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              additionalProperties: false
              properties:
                name:
                  type: string
                  description: The new name of the team.
                  example: My Renamed Team
                  maxLength: 50
      responses:
        '200':
          description: Team updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Team'
        '400':
          description: >-
            `name` is missing, empty, longer than 50 characters, or an unknown
            field was sent.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: 'Validation error: O nome do time é obrigatório.'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Team not found, or you are not the owner of the team.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Team not found or you are not the owner of this team.
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    Team:
      type: object
      description: >-
        A team as stored, with the owner and the members referenced by their
        user ID.
      properties:
        _id:
          type: string
          description: The unique identifier of the team.
          example: '000000000000000000000003'
        name:
          type: string
          description: The name of the team.
          example: My Team
        owner:
          type: string
          description: ID of the user who owns the team.
          example: '000000000000000000000002'
        members:
          type: array
          description: Members of the team. The owner is not part of this list.
          items:
            type: object
            properties:
              _id:
                type: string
                description: The unique identifier of the membership entry.
                example: '000000000000000000000006'
              user:
                type: string
                description: >-
                  ID of the member (this is the `memberId` used by the member
                  endpoints).
                example: '000000000000000000000005'
              permissions:
                $ref: '#/components/schemas/TeamPermissions'
        invites:
          type: array
          description: Pending invites.
          items:
            $ref: '#/components/schemas/TeamInvite'
        createdAt:
          type: string
          format: date-time
          description: When the team was created.
          example: '2025-01-01T12:00:00.000Z'
        updatedAt:
          type: string
          format: date-time
          description: When the team was last updated.
          example: '2025-01-01T12:00:00.000Z'
        __v:
          type: integer
          description: Internal document version.
          example: 0
    Error:
      type: object
      description: >-
        Every error returned by the API has this shape. The message can be in
        English or in Portuguese depending on the endpoint.
      required:
        - error
      properties:
        error:
          type: string
          description: Human readable description of the error.
          example: Application not found.
    TeamPermissions:
      type: object
      description: >-
        What a team member is allowed to do. The team owner always has every
        permission.
      properties:
        canCreateApplication:
          type: boolean
          description: Create applications in the team.
        canDeleteApplication:
          type: boolean
          description: Delete applications of the team.
        canUpdateApplicationSettings:
          type: boolean
          description: Update the settings of applications of the team.
        canChangeStatusApplication:
          type: boolean
          description: Start, stop and restart applications of the team.
        canManageApplicationBackup:
          type: boolean
          description: Manage backups of applications of the team.
        canEditApplicationFiles:
          type: boolean
          description: Upload and edit files of applications of the team.
        canSeeApplicationFiles:
          type: boolean
          description: List, read and download files of applications of the team.
        canDeleteApplicationFiles:
          type: boolean
          description: Delete files of applications of the team.
        canCreateDatabase:
          type: boolean
          description: Create databases in the team.
        canDeleteDatabase:
          type: boolean
          description: Delete databases of the team.
        canUpdateDatabaseSettings:
          type: boolean
          description: Update the settings of databases of the team.
        canChangeStatusDatabase:
          type: boolean
          description: Start, stop and restart databases of the team.
      example:
        canCreateApplication: false
        canDeleteApplication: false
        canUpdateApplicationSettings: false
        canChangeStatusApplication: true
        canManageApplicationBackup: false
        canEditApplicationFiles: true
        canSeeApplicationFiles: true
        canDeleteApplicationFiles: false
        canCreateDatabase: false
        canDeleteDatabase: false
        canUpdateDatabaseSettings: false
        canChangeStatusDatabase: false
    TeamInvite:
      type: object
      description: >-
        A pending invite. The invite code is never returned by the API; it is
        only sent to the invited e-mail address.
      properties:
        _id:
          type: string
          description: The unique identifier of the invite.
          example: '000000000000000000000006'
        email:
          type: string
          description: E-mail address that was invited.
          example: invited@example.com
        userId:
          type: string
          description: ID of the invited user.
          example: '000000000000000000000005'
        invitedAt:
          type: string
          format: date-time
          description: When the invite e-mail was last sent.
          example: '2025-01-01T12:00:00.000Z'
        permissions:
          $ref: '#/components/schemas/TeamPermissions'
          description: Permissions the user receives when accepting the invite.
        subscriptionEndsAt:
          type: string
          format: date-time
          description: >-
            When the invite expires (2 days after it was created). Expired
            invites are removed automatically.
          example: '2025-01-01T12:00:00.000Z'
  responses:
    Unauthorized:
      description: >-
        The `Authorization` header is missing or malformed, or the API token is
        invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Invalid developer token
    TooManyRequests:
      description: >-
        A rate limit was exceeded. See the `RateLimit-*` and `Retry-After`
        response headers.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Too many requests, please try again later
    InternalError:
      description: >-
        Unexpected error. On endpoints that do not document a `400` for it, this
        is also returned when an ID in the URL is not a valid identifier.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Internal server error. Please try again later.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your CamposCloud API token, sent as `Authorization: Bearer <token>`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.