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

# Delete a Team

> Delete a team for good. Its memberships, invitations, workflows and scheduling pages go, bookings stay with the workspace, and the response counts what was removed.



## OpenAPI

````yaml DELETE /teams/{teamId}
openapi: 3.0.0
info:
  title: Zeeg Public API
  description: >-
    Zeeg public API documentation.


    ## Authentication

    All endpoints require a Bearer token. You can generate an API token from
    [your Zeeg dashboard](https://app.zeeg.me/account/settings/api-access).


    Each token is scoped to specific permissions (e.g. `events:read`,
    `webhooks:write`). Make sure your token has the required scopes for the
    endpoints you want to use.


    ## Responses

    Every response is JSON, whatever `Accept` header the request sends.
  version: 2.0.0
  x-logo:
    url: https://app.zeeg.me/img/logo-dark.2ca83593.svg
    backgroundColor: '#f7f7f9'
    altText: zeeg
  contact:
    name: Zeeg Support
    email: support@zeeg.me
    url: https://zeeg.me/en/contact
  license:
    name: Proprietary
    url: https://zeeg.me/en/legal/terms
  termsOfService: https://zeeg.me/en/legal/terms
servers:
  - url: https://api.zeeg.me/v2
    description: Production
security:
  - bearer: []
tags:
  - name: Scheduled Events
    description: Management of events scheduled via Zeeg
  - name: Scheduling Pages
    description: Scheduling pages information and management
  - name: Availability Schedule
    description: Read and change availability for users
  - name: Webhooks
    description: Webhooks management
  - name: Notes
    description: Notes for scheduled events
  - name: Workspaces & Teams
    description: Workspace users and team member management
  - name: AI Agent
    description: AI Agent integration endpoints
  - name: Payloads
    description: Webhook payload schemas
  - name: CRM - Objects
    description: >-
      Discover the schema of CRM objects (standard and custom) including all
      attribute definitions
  - name: CRM - Companies
    description: Create, read, update, and delete CRM company records
  - name: CRM - People
    description: Create, read, update, and delete CRM person records
  - name: Routing Forms - Forms
    description: Read routing forms with their questions and their routes
  - name: Routing Forms - Submissions
    description: Read and delete the submissions that invitees send through a routing form
paths:
  /teams/{teamId}:
    parameters:
      - schema:
          type: string
        in: path
        name: teamId
        required: true
        description: The UUID or the slug of the team. The slug match ignores case.
    delete:
      tags:
        - Workspaces & Teams
      summary: Delete a team
      description: >-
        Deletes a team for good and answers with what the delete removed. Delete
        a team only after the user confirmed it by the team's name.


        The team's memberships, pending invitations and workflows are deleted,
        and its scheduling pages move to the workspace's trash. Routing form
        rules that send to the team are removed; a fallback rule is reset to a
        custom page instead. The team's public page stops working. Bookings stay
        with the workspace and the people stay in the workspace.


        Only the workspace owner, admins and partners can delete a team. A team
        of another workspace answers 404.


        **Required scope:** `teams:write`
      operationId: delete-teams-teamId
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  status:
                    type: integer
                    example: 200
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      title:
                        type: string
                      removed:
                        type: object
                        properties:
                          eventTypes:
                            type: integer
                            description: >-
                              Scheduling pages of the team, now in the
                              workspace's trash.
                          members:
                            type: integer
                            description: Memberships ended.
                          invitations:
                            type: integer
                            description: Pending team invitations dropped.
                          workflows:
                            type: integer
                            description: Workflows of the team deleted.
                          routingFormRulesRemoved:
                            type: integer
                            description: Routing form rules that sent to the team, removed.
                          routingFormRulesReset:
                            type: integer
                            description: >-
                              Fallback rules that sent to the team, reset to a
                              custom page.
              examples:
                Team deleted:
                  value:
                    success: true
                    status: 200
                    data:
                      id: 0c8e5a44-7f1d-4e0b-9c53-1d2f6a9b7e10
                      title: Customer Success
                      removed:
                        eventTypes: 3
                        members: 5
                        invitations: 1
                        workflows: 2
                        routingFormRulesRemoved: 1
                        routingFormRulesReset: 0
        '401':
          $ref: '#/components/responses/401'
        '403':
          description: The token misses the scope, or you may not delete this team.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceError'
        '404':
          description: No team with this id or slug in your workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceError'
      security:
        - bearer: []
components:
  responses:
    '401':
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: Unauthenticated.
          examples:
            Unauthenticated:
              value:
                message: Unauthenticated.
  schemas:
    WorkspaceError:
      type: object
      description: The error envelope of the team and invitation endpoints.
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
        status:
          type: integer
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: ''

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.