> ## 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

> This endpoint retrieves all teams you own or are a member of.



## OpenAPI

````yaml GET /v1/teams
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:
    get:
      tags:
        - Teams
      description: >-
        Returns every team you own or are a member of. Teams you own come first.
        The list is not paginated.
      responses:
        '200':
          description: The teams of the authenticated user.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TeamListItem'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    TeamListItem:
      type: object
      description: A team as returned by the team list.
      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:
          $ref: '#/components/schemas/TeamUser'
          description: The user who owns the team.
        members:
          type: array
          description: Members of the team. The owner is not part of this list.
          items:
            $ref: '#/components/schemas/TeamMemberPopulated'
        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
        applicationsCount:
          type: integer
          description: Number of applications that belong to the team.
          example: 2
        databaseInstancesCount:
          type: integer
          description: Number of database instances that belong to the team.
          example: 0
    TeamUser:
      type: object
      properties:
        _id:
          type: string
          description: The unique identifier of the user.
          example: '000000000000000000000002'
        name:
          type: string
          description: The name of the user.
          example: John Doe
        email:
          type: string
          description: The e-mail address of the user.
          example: user@example.com
    TeamMemberPopulated:
      type: object
      properties:
        _id:
          type: string
          description: The unique identifier of the membership entry.
          example: '000000000000000000000006'
        user:
          $ref: '#/components/schemas/TeamUser'
          description: >-
            The member. `user._id` is the `memberId` used by the member
            endpoints.
        permissions:
          $ref: '#/components/schemas/TeamPermissions'
    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'
    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
  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.