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

# Remove tags from a file

> Removes the listed tags the file has, possibly all of them. Listed tags the file does not
have are ignored.

The caller must be permitted every listed tag. Removing the last tag a tag-limited role may
see hides the file from that role.




## OpenAPI

````yaml /pro/api/openapi.yml post /v2/FileDeleteTags
openapi: 3.0.3
info:
  title: Databunker Pro API
  description: >
    Databunker Pro is a privacy-compliant user data vault and tokenization
    engine that provides secure storage and management of user data with
    built-in privacy controls, consent management, and audit capabilities.


    ## Key Features

    - **User Tokenization**: Create, update, and manage user profiles with
    privacy controls

    - **Consent Management**: Handle legal basis and user agreements for
    GDPR/DPDP compliance

    - **Format Preserving Tokenization**: Secure tokenization of sensitive data
    like credit cards

    - **File Storage**: Encrypted per-user file storage backed by local disk,
    Amazon S3, Google Cloud Storage, or Azure Blob Storage

    - **Audit Trail**: Complete audit logging of all data access and
    modifications

    - **Multi-tenant**: Support for multiple tenants with isolated data

    - **Role-based Access**: Fine-grained access control with policies and roles

    - **Bulk Operations**: Efficient bulk data operations with unlock mechanisms


    ## Authentication

    All API calls require authentication via the `X-Bunker-Token` header. For
    multi-tenant setups, use the `X-Bunker-Tenant` header to specify the tenant
    context.


    ### Multi-Tenant Usage

    Multi-tenancy is supported on PostgreSQL, MySQL (Percona), and Oracle
    backend databases. On PostgreSQL it is enforced with the database's native
    row-level security (RLS).


    When using Databunker Pro in a multi-tenant environment:


    - **Single Tenant**: Omit the `X-Bunker-Tenant` header (default behavior)

    - **Multi-Tenant**: Include `X-Bunker-Tenant: your-tenant-name` header


    **Example:**

    ```bash

    # Single tenant

    curl -X POST http://localhost:3000/v2/UserCreate \
      -H "X-Bunker-Token: your-token" \
      -d '{"profile":{"login":"user1"}}'

    # Multi-tenant

    curl -X POST http://localhost:3000/v2/UserCreate \
      -H "X-Bunker-Token: your-token" \
      -H "X-Bunker-Tenant: acme-corp" \
      -d '{"profile":{"login":"user1"}}'
    ```


    ## Base URL

    The API is available at `/v2/` endpoint with all requests using POST method.


    ## Error Handling

    Every error is returned as a JSON body with a fixed shape:


    ```json

    {"status": "error", "message": "The user record was not found"}

    ```


    HTTP status codes follow REST conventions:


    | Code | Meaning |

    |------|---------|

    | 400  | Bad request — malformed body, missing or invalid parameters, schema
    validation failure |

    | 403  | Access denied — missing or invalid API token, insufficient
    permissions, `Access denied by policy`, or a disabled feature. Also returned
    as `Record limit reached` when the license record cap is hit (reads, updates
    and deletes still work) and as `License expired` when the license has lapsed
    (the vault is read-only) |

    | 404  | The referenced record was not found |

    | 409  | Conflict — duplicate record, name already in use, or operation
    conflicts with the record's current state |

    | 500  | Internal server error |


    Successful responses always include `"status": "ok"`. As a defensive
    pattern, check the JSON `status` field in addition to the HTTP status code.


    **Note:** Databunker Pro releases prior to the 2026-07 update returned HTTP
    `405` for most error conditions. If you run an older release, treat any
    non-2xx response as an error and rely on the JSON `status`/`message` fields.
  version: 2.0.0
  contact:
    name: Databunker Support
    url: https://databunker.org
  termsOfService: https://databunker.org/legal/terms/
  license:
    name: Commercial license
    url: https://databunker.org/legal/terms/
servers:
  - url: https://databunkerpro.myorg.com
    description: Your self-hosted Databunker Pro deployment
  - url: http://localhost:3000
    description: Local development server
security:
  - XBunkerToken: []
tags:
  - name: User Tokenization
    description: Operations for creating, reading, updating, and deleting users
  - name: App Data Management
    description: Operations for managing application-specific user data
  - name: File Storage
    description: Operations for storing, retrieving, and deleting encrypted user files
  - name: Legal Basis Management
    description: Operations for managing legal basis for data processing
  - name: Agreement Management
    description: Operations for managing user agreements and consent
  - name: Processing Activity Management
    description: Operations for managing data processing activities
  - name: Format Preserving Tokenization
    description: Operations for tokenizing sensitive data
  - name: Group Management
    description: Operations for managing user groups
  - name: Role Management
    description: Operations for managing user roles
  - name: Policy Management
    description: Operations for managing access control policies
  - name: Authentication
    description: Operations for creating access tokens
  - name: Bulk Operations
    description: Operations for bulk data processing
  - name: Audit Management
    description: Operations for accessing audit logs
  - name: Tenant Management
    description: Operations for managing multi-tenant setups
  - name: Shared Records
    description: Operations for creating and accessing shared user records
  - name: Session Management
    description: Operations for managing user sessions
  - name: System Operations
    description: Operations for system administration and monitoring
paths:
  /v2/FileDeleteTags:
    post:
      tags:
        - File Storage
      summary: Remove tags from a file
      description: >
        Removes the listed tags the file has, possibly all of them. Listed tags
        the file does not

        have are ignored.


        The caller must be permitted every listed tag. Removing the last tag a
        tag-limited role may

        see hides the file from that role.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - mode
                - identity
                - fileuuid
                - tags
              properties:
                mode:
                  type: string
                  enum:
                    - login
                    - token
                    - email
                    - phone
                    - custom
                  description: Mode of user identification
                identity:
                  type: string
                  description: User identifier corresponding to the mode
                fileuuid:
                  type: string
                  description: UUID of the file
                tags:
                  oneOf:
                    - type: array
                      items:
                        type: string
                    - type: string
                  description: >-
                    Tags to remove — an array or a comma-separated string, at
                    least one tag
                request_metadata:
                  type: object
                  description: Additional metadata for the request
      responses:
        '200':
          description: Tags removed
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: ok
                  token:
                    type: string
                    description: User token that owns the file
                  fileuuid:
                    type: string
                  tags:
                    type: array
                    items:
                      type: string
                    description: >-
                      The file's tags afterwards, limited to those the caller
                      may see
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  responses:
    BadRequest:
      description: >-
        Bad request — malformed body, missing or invalid parameters, schema
        validation failure
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            status: error
            message: 'Missing API request parameters: profile'
    AccessDenied:
      description: >-
        Access denied — missing or invalid API token, insufficient permissions,
        denied by policy, disabled feature, or license limit
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            status: error
            message: Access denied by policy
    NotFound:
      description: The referenced record was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            status: error
            message: The user record was not found
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            status: error
            message: Internal error
  schemas:
    Error:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          enum:
            - error
          example: error
        message:
          type: string
          description: Human-readable error message
  securitySchemes:
    XBunkerToken:
      type: apiKey
      in: header
      name: X-Bunker-Token
      description: API token for authentication

````

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