> ## 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/create/{name}

> This endpoint creates a new team.

> [!NOTE]
>
> The team name is part of the URL and there is no request body. Remember to URL encode the name.


## OpenAPI

````yaml POST /v1/teams/create/{name}
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/create/{name}:
    post:
      tags:
        - Teams
      description: >-
        Creates a team owned by the authenticated user. The name is sent in the
        URL and there is no request body. Your account must have a subscription,
        you can own at most 5 teams and you cannot own two teams with the same
        name.
      parameters:
        - name: name
          in: path
          required: true
          description: Name of the team (URL encoded).
          schema:
            type: string
            maxLength: 50
          example: My Team
      responses:
        '201':
          description: Team created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Team'
        '400':
          description: >-
            The name is longer than 50 characters, you already own a team with
            this name, or you already own 5 teams.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: You already have a team with this name.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: Your account has no subscription.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: You need to have an active subscription to create a 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.