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

# Get my teams

> Retrieves all teams that the user is a member of. Optionally filter by game ID.



## OpenAPI

````yaml /api-reference/teams/openapi.json get /teams/me
openapi: 3.0.0
info:
  title: Teams
  version: 1.0.0
  description: API endpoints for managing teams in the 16TMS platform
servers:
  - url: https://api.16tms.com/api/v1
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /teams/me:
    get:
      summary: Get my teams
      description: >-
        Retrieves all teams that the user is a member of. Optionally filter by
        game ID.
      operationId: getMyTeams
      parameters:
        - name: externalId
          in: query
          description: External user ID to retrieve teams for
          required: true
          schema:
            type: string
          example: user_123
        - name: gameId
          in: query
          description: Optional game filter. Returns teams for all games if omitted.
          required: false
          schema:
            type: string
            format: uuid
          example: 3b1dd428-f288-4654-beff-ae523005f47a
      responses:
        '200':
          description: Teams fetched successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetMyTeamsResponse'
              example:
                success: true
                message: Teams fetched successfully
                data:
                  - teamId: f0ae597c-a8e9-455c-96ea-d54cf9e98c23
                    name: dhruvvv
                    role: 1
                    isOwner: true
                    logo: test
                    gameId: 3b1dd428-f288-4654-beff-ae523005f47a
                    gameName: BGMI
                    gameImage: >-
                      https://metaninzamedia.blob.core.windows.net/media/games/20260209131841_8be0463e43471d299608f26d92555064.webp
                    joinedAt: '2026-02-09T13:22:47.392121Z'
                    members:
                      - userId: 302cb943-26a3-40e1-92f4-216ac2b264d7
                        email: ''
                        username: dhruvpatel
                        role: 1
                        joinedAt: '2026-02-09T13:22:47.392121Z'
                        profileImage: null
                        gameId: 3b1dd428-f288-4654-beff-ae523005f47a
                        userGameId: bossxdhruv
                meta:
                  traceId: 00-30eb584edc33d3b3c6abc2f2a48d531b-c7db91fb01d98955-00
                  elapsedMs: 42.28
                  serverTimestamp: '2026-02-09T13:25:26.0306215Z'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: User not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    GetMyTeamsResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Indicates if the request was successful
          example: true
        message:
          type: string
          description: A message describing the result of the operation
          example: Teams fetched successfully
        data:
          type: array
          description: List of teams the user is a member of
          items:
            $ref: '#/components/schemas/TeamWithMembers'
        meta:
          type: object
          properties:
            traceId:
              type: string
              description: Unique trace identifier for debugging purposes
              example: 00-30eb584edc33d3b3c6abc2f2a48d531b-c7db91fb01d98955-00
            elapsedMs:
              type: number
              description: Time taken to process the request in milliseconds
              example: 42.28
            serverTimestamp:
              type: string
              format: date-time
              description: Server timestamp when the response was generated
              example: '2026-02-09T13:25:26.0306215Z'
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Indicates if the request was successful
          example: false
        message:
          type: string
          description: Error message describing what went wrong
          example: Invalid API key
        errors:
          type: array
          description: Detailed error information
          items:
            type: object
            properties:
              field:
                type: string
                description: The field that caused the error
                example: name
              message:
                type: string
                description: Description of the error
                example: This field is required
        meta:
          type: object
          properties:
            traceId:
              type: string
              description: Unique trace identifier for debugging purposes
            serverTimestamp:
              type: string
              format: date-time
              description: Server timestamp when the error occurred
    TeamWithMembers:
      type: object
      properties:
        teamId:
          type: string
          format: uuid
          description: Unique identifier for the team
          example: f0ae597c-a8e9-455c-96ea-d54cf9e98c23
        name:
          type: string
          description: Name of the team
          example: dhruvvv
        role:
          $ref: '#/components/schemas/TeamRole'
        isOwner:
          type: boolean
          description: Indicates if the user is the owner of the team
          example: true
        logo:
          type: string
          description: URL to the team's logo
          example: test
        gameId:
          type: string
          format: uuid
          description: ID of the game this team is associated with
          example: 3b1dd428-f288-4654-beff-ae523005f47a
        gameName:
          type: string
          description: Name of the game
          example: BGMI
        gameImage:
          type: string
          format: uri
          description: URL to the game's image
          example: >-
            https://metaninzamedia.blob.core.windows.net/media/games/20260209131841_8be0463e43471d299608f26d92555064.webp
        joinedAt:
          type: string
          format: date-time
          description: Timestamp when the user joined the team
          example: '2026-02-09T13:22:47.392121Z'
        members:
          type: array
          description: List of team members
          items:
            $ref: '#/components/schemas/TeamMember'
    TeamRole:
      type: integer
      description: Role of the member in the team (1 = Owner, 3 = Member)
      enum:
        - 1
        - 3
      x-enum-varnames:
        - Owner
        - Member
      x-enum-descriptions:
        - Team Owner
        - Team Member
    TeamMember:
      type: object
      properties:
        userId:
          type: string
          format: uuid
          description: Unique identifier for the user
          example: 302cb943-26a3-40e1-92f4-216ac2b264d7
        externalId:
          type: string
          description: External identifier for the user
          nullable: true
          example: null
        email:
          type: string
          format: email
          description: Email address of the team member
          example: ''
        username:
          type: string
          description: Username of the team member
          example: dhruvpatel
        role:
          $ref: '#/components/schemas/TeamRole'
        joinedAt:
          type: string
          format: date-time
          description: Timestamp when the member joined the team
          example: '2026-02-09T13:22:47.392121Z'
        profileImage:
          type: string
          format: uri
          description: URL to the member's profile image
          example: null
          nullable: true
        gameId:
          type: string
          format: uuid
          description: ID of the game
          example: 3b1dd428-f288-4654-beff-ae523005f47a
        userGameId:
          type: string
          description: User's in-game ID
          example: bossxdhruv
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        API key for authentication. You can generate this from the 16TMS
        console.

````