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

# Get Teams

> Returns a list of all teams associated with the authenticated user.



## OpenAPI

````yaml get /teams
openapi: 3.1.0
info:
  title: Playbook API Documentation
  description: >-
    This is the documentation for the Playbook API. You can use this API to use
    our service programmatically, this is done by using your API key. <br/> You
    can view your API key using the 'User' tab on https://beta.playbook3d.com/.
  version: '1.0'
servers: []
security: []
tags: []
paths:
  /teams:
    get:
      tags:
        - teams
      summary: List All Teams
      description: Returns a list of all teams associated with the authenticated user.
      operationId: get_teams
      parameters:
        - name: x-api-key
          in: header
          description: >-
            Your API key. This is required by most endpoints to access our API
            programmatically. You can view your x-api-key using the 'Profile'
            tab on the website.
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Bearer token for authentication (JWT).
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response. Returns a JSON array of teams.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      description: Team's unique ID (UUID).
                    name:
                      type: string
                      description: Team's name.
                example:
                  - id: 41480ee5-14ff-4f9e-89bf-91b0a8e50e77
                    name: My Example Team
                  - id: a13dbeff-de02-49dd-9593-182105d3f71a
                    name: Another Team
        '400':
          description: Bad Request. Possibly invalid query or parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: string
                    description: Bad Request. Possibly invalid query or parameters.
                example:
                  description: Bad Request. Possibly invalid query or parameters.
        '401':
          description: Unauthorized. The Bearer token or API key is invalid or missing.
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: string
                    description: >-
                      Unauthorized. The Bearer token or API key is invalid or
                      missing.
                example:
                  description: >-
                    Unauthorized. The Bearer token or API key is invalid or
                    missing.
        '403':
          description: Forbidden. The user does not have permission to view teams.
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: string
                    description: >-
                      Forbidden. The user does not have permission to view
                      teams.
                example:
                  description: Forbidden. The user does not have permission to view teams.
        '404':
          description: Not Found. The requested resource could not be found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: string
                    description: Not Found. The requested resource could not be found.
                example:
                  description: Not Found. The requested resource could not be found.
        '500':
          description: Internal Server Error. Something went wrong on the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: string
                    description: Internal Server Error. Something went wrong on the server.
                example:
                  description: Internal Server Error. Something went wrong on the server.
      x-codeSamples:
        - lang: cURL
          source: |-
            curl -X GET \
              -H 'Authorization: Bearer $API_KEY' \
              -H 'Accept: application/json' \
              'https://accounts.playbook3d.com/teams'
        - lang: Python
          source: >-
            import requests


            headers = {
                'x-api-key': '<YOUR_API_KEY>',
                'Authorization': 'Bearer <YOUR_JWT_TOKEN>',
                'Accept': 'application/json'
            }

            resp = requests.get('https://accounts.playbook3d.com/teams',
            headers=headers)

            print(resp.status_code, resp.json())
        - lang: JavaScript
          source: |-
            fetch('https://accounts.playbook3d.com/teams', {
              method: 'GET',
              headers: {
                'x-api-key': '<YOUR_API_KEY>',
                'Authorization': 'Bearer <YOUR_JWT_TOKEN>',
                'Accept': 'application/json'
              }
            })
              .then(res => res.json())
              .then(data => console.log(data))
              .catch(err => console.error(err));
        - lang: C#
          source: >-
            // Using HttpClient

            HttpClient client = new HttpClient();

            client.DefaultRequestHeaders.Add("x-api-key", "<YOUR_API_KEY>");

            client.DefaultRequestHeaders.Authorization = new
            AuthenticationHeaderValue("Bearer", "<YOUR_JWT_TOKEN>");


            var response = await
            client.GetAsync("https://accounts.playbook3d.com/teams");

            string content = await response.Content.ReadAsStringAsync();

            Console.WriteLine(response.StatusCode);

            Console.WriteLine(content);

````