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

# Unassign teams

> Unassigns a resource from one or several teams (head or side or both) for a date range. The result might update an existing resource team association by shortening it or delete it directly. Every related schedules and/or on calls of relevant teams for that period will also be deleted.



## OpenAPI

````yaml preview post /api/directory/resources.unassign-teams
openapi: 3.1.0
info:
  title: tipee
  version: preview
servers: []
security:
  - basicAuth: []
tags:
  - name: Activity
    description: Activity
  - name: Balances
    description: Balances
  - name: Directory
    description: Directory
  - name: Schedule
    description: Schedule
  - name: Timeclock
    description: Timeclock
paths:
  /api/directory/resources.unassign-teams:
    post:
      tags:
        - Directory
      summary: Unassign teams
      description: >-
        Unassigns a resource from one or several teams (head or side or both)
        for a date range. The result might update an existing resource team
        association by shortening it or delete it directly. Every related
        schedules and/or on calls of relevant teams for that period will also be
        deleted.
      operationId: post_app_ui_api_directory_directorycommand_unassignresourceteams
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UnassignResourceTeamsCommand'
      responses:
        '200':
          description: Resource successfully unassigned from team(s).
        '409':
          description: Warning to explain potential conflicts
          content:
            application/json:
              schema:
                properties:
                  warning_type:
                    $ref: '#/components/schemas/ResourceTeamWarningType'
                  description:
                    type: string
                  details:
                    $ref: '#/components/schemas/ResourceTeamUnassignWarningDetails'
                  required_action:
                    type: string
                type: object
components:
  schemas:
    UnassignResourceTeamsCommand:
      required:
        - resource_id
        - date_range
      properties:
        resource_id:
          $ref: '#/components/schemas/Snowflake'
        date_range:
          $ref: '#/components/schemas/LocalDateInterval'
        team_ids:
          type: array
          items:
            $ref: '#/components/schemas/Snowflake'
        head:
          type: boolean
        warning_aware:
          description: >-
            Unassigning resource to a team will be done only if you provide
            'warning_aware: true'.
          type: boolean
          default: false
      type: object
    ResourceTeamWarningType:
      type: string
      example: assign-conflicting-resource-teams
      enum:
        - assign-conflicting-resource-teams
        - unassign-remove-all-resource-teams
        - unassign-conflicting-resource-teams
    ResourceTeamUnassignWarningDetails:
      required:
        - modifications
        - deletions
        - has_related_schedules
        - has_related_on_calls
        - has_locked_dates
      properties:
        modifications:
          type: array
          items:
            $ref: '#/components/schemas/ResourceTeamWarningDetailsInfo'
          default: []
        deletions:
          type: array
          items:
            $ref: '#/components/schemas/ResourceTeamWarningDetailsInfo'
          default: []
        has_related_schedules:
          type: boolean
        has_related_on_calls:
          type: boolean
        has_locked_dates:
          type: boolean
      type: object
    Snowflake:
      type: string
      format: snowflake
      example: '872815618512410358'
    LocalDateInterval:
      type: string
      format: local-date-interval
      example: 2019-11-11/2019-12-12
    ResourceTeamWarningDetailsInfo:
      required:
        - team_id
        - date_range
        - head
      properties:
        team_id:
          $ref: '#/components/schemas/Snowflake'
        date_range:
          $ref: '#/components/schemas/LocalDateInterval'
        head:
          type: boolean
      type: object

````