# Remove files

- Operation ID: `removeFiles`
- HTTP method: `POST`
- Path: `/uploader-service/storage-files/delete-by-uuid`
- [Human-readable API reference](https://hub.synerise.com/api-reference/asset-management#tag/Uploader/operation/removeFiles)

## Self-contained OpenAPI method

The fenced document below contains this method's documentation and all of its local references. It is self-contained; no category or master specification fetch is required.

```yaml
openapi: 3.0.0
info:
  title: Synerise Public API
  version: 1.9.1
paths:
  /uploader-service/storage-files/delete-by-uuid:
    post:
      tags:
        - Uploader
      summary: Remove files
      description: |
        Delete one or more files.

        <strong><span style="color:red">IMPORTANT:</span></strong> Due to technical limitations, the code examples on the right don't include the form data. If you use the examples, remember to add it.

        Example correct cURL request:
        <pre>
        curl --location 'https://api.synerise.com/uploader-service/storage-files/delete-by-uuid' \
        --header 'Authorization: Bearer YOUR_TOKEN' \
        --form 'uuids="[\"0ac106beb55c401bac8bc8244e367512\",\"03dc506041e24c3cae284fd3f6611082\"]"'
        </pre>


        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `assets_explorer: delete`
      operationId: removeFiles
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                uuids:
                  description: File UUIDs, without dashes (stringified JSON array) <br/>Example:<br/>`["0ac106beb55c401bac8bc8244e367512","03dc506041e24c3cae284fd3f6611082"]`
                  type: string
              required:
                - uuids
      responses:
        "200":
          description: Results of the operation
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: boolean
                  description: Each key in this object is the UUID of a file. If the file was deleted successfully, the value is `true`.
                example:
                  0ac106beb55c401bac8bc8244e367512: true
                  03dc506041e24c3cae284fd3f6611082: true
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/asset-management#tag/Uploader/operation/removeFiles
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uploader-service/storage-files/delete-by-uuid \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: multipart/form-data' \
              --form uuids=string
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"uuids\"\r\n\r\nstring\r\n-----011000010111000001101001--\r\n"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "multipart/form-data"
                }

            conn.request("POST", "/uploader-service/storage-files/delete-by-uuid", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = new FormData();
            data.append("uuids", "string");

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/uploader-service/storage-files/delete-by-uuid");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/uploader-service/storage-files/delete-by-uuid",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"uuids\"\r\n\r\nstring\r\n-----011000010111000001101001--\r\n");
            req.end();
        - lang: PHP
          label: PHP
          source: "<?php


            $request = new HttpRequest();

            $request->setUrl('https://api.synerise.com/uploader-service/storage-files/delete-by-uuid');

            $request->setMethod(HTTP_METH_POST);


            $request->setHeaders([

            \  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',

            \  'content-type' => 'multipart/form-data'

            ]);


            $request->setBody('-----011000010111000001101001\r

            Content-Disposition: form-data; name=\"uuids\"\r

            \r

            string\r

            -----011000010111000001101001--\r

            ');


            try {

            \  $response = $request->send();


            \  echo $response->getBody();

            } catch (HttpException $ex) {

            \  echo $ex;

            }"
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/uploader-service/storage-files/delete-by-uuid")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"uuids\"\r\n\r\nstring\r\n-----011000010111000001101001--\r\n")
              .asString();
servers:
  - description: Microsoft Azure EU
    url: https://api.synerise.com
  - description: Microsoft Azure USA
    url: https://api.azu.synerise.com
  - description: Google Cloud Platform
    url: https://api.geb.synerise.com
tags:
  - name: Uploader
components:
  securitySchemes:
    JWT:
      type: http
      scheme: bearer
      description: |-
        JWT Bearer token. The header looks like this: `Bearer {JWT}`

        Remember to include the space between 'Bearer' and the token.

        Generate a token via the **Authorization** endpoints.
```
