For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dashboard
GuidesIntegrationsAPI ReferencesRelease notes
GuidesIntegrationsAPI ReferencesRelease notes
    • APIs overview
  • Upload API
    • Errors
  • REST API
    • Authentication
      • GETList of files
      • PUTStore file
      • DELDelete file
      • GETFile info
      • PUTBatch file storing
      • DELBatch file delete
      • POSTCopy file to local storage
      • POSTCopy file to remote storage
    • File Metadata
    • Add Ons
    • Changelog
    • Versioning
  • URL API
    • File Information
    • File Names
    • File groups
    • Image processing limitations
    • Image compression
    • Image resize and crop
    • Image rotation
    • Image overlays
    • Image colors
    • Image definition
    • Image recognition
    • Other image operations
    • Proxy
    • Signed URLs
    • CDN settings
    • Integrations
Dashboard
LogoLogo
REST APIFile

Batch file delete

DELETE
https://api.uploadcare.com/files/storage/
DELETE
/files/storage/
$curl -X DELETE https://api.uploadcare.com/files/storage/ \
> -H "Accept: application/vnd.uploadcare-v0.7+json" \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '[
> "21975c81-7f57-4c7a-aef9-acfe28779f78",
> "cbaf2d73-5169-4b2b-a543-496cf2813dff"
>]'
1{
2 "status": "ok",
3 "problems": {
4 "21975c81-7f57-4c7a-aef9-acfe28779f78": "Missing in the project",
5 "4j334o01-8bs3": "Invalid"
6 },
7 "result": [
8 {
9 "datetime_removed": "2024-01-15T09:30:00Z",
10 "datetime_stored": "2024-01-15T09:30:00Z",
11 "datetime_uploaded": "2024-01-15T09:30:00Z",
12 "is_image": true,
13 "is_ready": true,
14 "mime_type": "image/jpeg",
15 "original_file_url": "https://ucarecdn.com/e575ed4e8-f4e8-4c14-a58b-1527b6d9ee46/EU_4.jpg",
16 "original_filename": "EU_4.jpg",
17 "size": 145212,
18 "url": "https://api.uploadcare.com/files/e10ce759-42c3-4185-bae5-e22a9143d68f/",
19 "uuid": "575ed4e8-f4e8-4c14-a58b-1527b6d9ee46",
20 "variations": {},
21 "content_info": {
22 "mime": {
23 "mime": "image/jpeg",
24 "type": "image",
25 "subtype": "jpeg"
26 },
27 "image": {
28 "color_mode": "RGBA",
29 "orientation": 6,
30 "format": "JPEG",
31 "sequence": false,
32 "height": 2352,
33 "width": 2935,
34 "geo_location": {
35 "latitude": -1.1884555555555556,
36 "longitude": 52.66996666666667
37 },
38 "datetime_original": "2018-09-13T16:23:40Z",
39 "dpi": [
40 72,
41 72
42 ]
43 },
44 "video": {
45 "duration": 261827,
46 "format": "mp4",
47 "bitrate": 393,
48 "audio": [
49 {
50 "bitrate": 78,
51 "codec": "aac",
52 "sample_rate": 44100,
53 "channels": 2
54 }
55 ],
56 "video": [
57 {
58 "height": 360,
59 "width": 640,
60 "frame_rate": 30,
61 "bitrate": 315,
62 "codec": "h264"
63 }
64 ]
65 }
66 },
67 "metadata": {},
68 "appdata": {
69 "aws_rekognition_detect_labels": {
70 "version": "2016-06-27",
71 "datetime_created": "2024-01-15T09:30:00Z",
72 "datetime_updated": "2024-01-15T09:30:00Z",
73 "data": {
74 "LabelModelVersion": "2.0",
75 "Labels": [
76 {
77 "Confidence": 93.41645812988281,
78 "Instances": [],
79 "Name": "Home Decor",
80 "Parents": []
81 },
82 {
83 "Confidence": 70.75951385498047,
84 "Instances": [],
85 "Name": "Linen",
86 "Parents": [
87 {
88 "Name": "Home Decor"
89 }
90 ]
91 },
92 {
93 "Confidence": 64.7123794555664,
94 "Instances": [],
95 "Name": "Sunlight",
96 "Parents": []
97 },
98 {
99 "Confidence": 56.264793395996094,
100 "Instances": [],
101 "Name": "Flare",
102 "Parents": [
103 {
104 "Name": "Light"
105 }
106 ]
107 },
108 {
109 "Confidence": 50.47153854370117,
110 "Instances": [],
111 "Name": "Tree",
112 "Parents": [
113 {
114 "Name": "Plant"
115 }
116 ]
117 }
118 ]
119 }
120 },
121 "aws_rekognition_detect_moderation_labels": {
122 "version": "2016-06-27",
123 "datetime_created": "2024-01-15T09:30:00Z",
124 "datetime_updated": "2024-01-15T09:30:00Z",
125 "data": {
126 "ModerationModelVersion": "6.0",
127 "ModerationLabels": [
128 {
129 "Confidence": 93.41645812988281,
130 "Name": "Weapons",
131 "ParentName": "Violence"
132 }
133 ]
134 }
135 },
136 "remove_bg": {
137 "version": "1.0",
138 "datetime_created": "2024-01-15T09:30:00Z",
139 "datetime_updated": "2024-01-15T09:30:00Z",
140 "data": {
141 "foreground_type": "person"
142 }
143 },
144 "uc_clamav_virus_scan": {
145 "version": "0.104.2",
146 "datetime_created": "2024-01-15T09:30:00Z",
147 "datetime_updated": "2024-01-15T09:30:00Z",
148 "data": {
149 "infected": false,
150 "infected_with": ""
151 }
152 }
153 }
154 }
155 ]
156}

Used to delete multiple files in one go. Up to 100 files are supported per request. A JSON object holding your File list SHOULD be put into a request body.

Note: this operation removes files from storage but doesn’t invalidate CDN cache.

Was this page helpful?
Previous

Copy file to local storage

Next
Built with

Authentication

Authorizationstring

Every request made to https://api.uploadcare.com/ MUST be signed. HTTPS SHOULD be used with any authorization scheme.

Requests MUST contain the Authorization header defining auth-scheme and auth-param: Authorization: auth-scheme auth-param.

Every request MUST contain the Accept header identifying the REST API version: Accept: application/vnd.uploadcare-v0.7+json.

There are two available authorization schemes:

  • For production: Uploadcare, a scheme where a signature, not your Secret API Key MUST be specified. Signatures SHOULD be generated on backend.
  • For quick tests: Uploadcare.Simple, a simple scheme where your Secret API Key MUST be specified in every request’s auth-param.

Headers

AcceptstringRequired
Version header.

Request

This endpoint expects a list of strings.

Response

OK. See problems and result fields in the response. In case a file list provided in a request holds invalid UUIDs, they’ll be included in the problems structure. Invalid UUIDs can be incomplete, associated with files that no longer exist, etc.

statusstring
problemsobject
Dictionary of passed files UUIDs and problems associated with these UUIDs.
resultlist of objects

List of file objects that have been stored/deleted.

Errors

400
Bad Request Error
401
Unauthorized Error
406
Not Acceptable Error
429
Too Many Requests Error