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

# Create team environment

> Requires a team API key (`bzy_team_*`) or internal auth. Project API keys are rejected.



## OpenAPI

````yaml /openapi/v1.json post /teams/{id}/environments
openapi: 3.1.0
info:
  title: Bugzy API
  description: >-
    Programmatic access to Bugzy's QA automation capabilities. Trigger test
    runs, query results, manage schedules, and configure event triggers.
  version: 1.0.0
  contact:
    name: Bugzy Support
    url: https://www.bugzy.ai
servers:
  - url: https://bugzy.ai/api/v1
    description: Production
security:
  - bearerAuth: []
paths:
  /teams/{id}/environments:
    post:
      tags:
        - Team Environments
      summary: Create team environment
      description: >-
        Requires a team API key (`bzy_team_*`) or internal auth. Project API
        keys are rejected.
      operationId: createTeamEnvironment
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                slug:
                  type: string
                description:
                  type: string
                  nullable: true
                is_default:
                  type: boolean
              required:
                - name
      responses:
        '201':
          description: Team environment created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Environment'
components:
  schemas:
    Environment:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        description:
          type: string
          nullable: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Project API key (bzy_proj_*) for project routes or team API key
        (bzy_team_*) for selected team routes.

````