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

# Delete Location

> Delete a location.

**Required Role:** ADMIN or OWNER

**Validation:** Cannot delete if the location is used by any tasks.
You must delete the tasks first.

Returns:
- 204 No Content on success
- 404 Not Found if location doesn't exist
- 409 Conflict if location is in use by tasks



## OpenAPI

````yaml DELETE /v1/teams/{team_id}/locations/{location_id}
openapi: 3.1.0
info:
  title: Data Raven API
  description: Cloud-to-cloud data transfer platform powered by RClone
  version: 0.5.0
servers: []
security: []
paths:
  /v1/teams/{team_id}/locations/{location_id}:
    delete:
      tags:
        - Locations
      summary: Delete Location
      description: |-
        Delete a location.

        **Required Role:** ADMIN or OWNER

        **Validation:** Cannot delete if the location is used by any tasks.
        You must delete the tasks first.

        Returns:
        - 204 No Content on success
        - 404 Not Found if location doesn't exist
        - 409 Conflict if location is in use by tasks
      operationId: delete_location_v1_teams__team_id__locations__location_id__delete
      parameters:
        - name: location_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Location Id
        - name: team_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Team Id
      responses:
        '204':
          description: Successful Response
        '404':
          description: Location not found
        '409':
          description: Location is in use by tasks
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````