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

# Add team members



## OpenAPI

````yaml /api-reference/openapi.json post /teams/{team_id}/members
openapi: 3.0.0
info:
  title: Corgea API
  version: 1.0.0
  description: >-
    API for interacting with Corgea's scanning and vulnerability management
    features
servers:
  - url: https://www.corgea.app/api/v1
    description: Production server
security:
  - CorgeaToken: []
  - BearerAuth: []
paths:
  /teams/{team_id}/members:
    parameters:
      - name: team_id
        in: path
        required: true
        description: Team ID
        schema:
          type: integer
    post:
      tags:
        - Teams
      summary: Add team members
      operationId: addTeamMembers
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TeamMembersRequest'
      responses:
        '200':
          description: Members added successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: Team or user not found
components:
  schemas:
    TeamMembersRequest:
      type: object
      required:
        - member_ids
      additionalProperties: false
      properties:
        member_ids:
          type: array
          items:
            type: integer
    TeamResponse:
      type: object
      required:
        - team
      properties:
        team:
          $ref: '#/components/schemas/Team'
    Team:
      type: object
      required:
        - id
        - name
        - active
        - members
        - project_ids
        - project_tags
        - repo_url_patterns
        - project_count
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        name:
          type: string
        active:
          type: boolean
        members:
          type: array
          items:
            $ref: '#/components/schemas/TeamMember'
        project_ids:
          type: array
          description: Projects assigned explicitly to the team.
          items:
            type: integer
        project_tags:
          type: array
          description: A project matches when it contains any listed tag.
          items:
            type: string
        repo_url_patterns:
          type: array
          description: >-
            A project matches when its repository URL contains any listed
            fragment, case-insensitively.
          items:
            type: string
            minLength: 3
        project_count:
          type: integer
          description: >-
            Distinct projects currently resolved through explicit assignment or
            selectors.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    TeamMember:
      type: object
      required:
        - id
        - email
        - first_name
        - last_name
      properties:
        id:
          type: integer
        email:
          type: string
          format: email
        first_name:
          type: string
        last_name:
          type: string
  responses:
    BadRequest:
      description: Invalid request
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Invalid JSON body
    Unauthorized:
      description: Invalid or missing token
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Missing or invalid authorization header
    Forbidden:
      description: Permission denied or feature unavailable
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Permission denied
  securitySchemes:
    CorgeaToken:
      type: apiKey
      in: header
      name: CORGEA-TOKEN
      description: API key for authentication
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth2 access token (JWT) in the Authorization header

````