Delete Uploaded Image (Cloudinary)
Deletes an image stored on Cloudinary using its unique publicId. Express 5 wildcard routing supports full multi-segment paths including nested folders (e.g., drivers/kyc/sample_image).
Endpoint Overview
-
Method:
DELETE -
Route:
/api/v1/upload/:publicId(supports nested folder paths:/api/v1/upload/{folder}/{image_id}) -
Authentication:
None (Public) -
Content-Type:
N/A
Path Parameters
Example Request URLs
-
DELETE {{baseUrl}}/api/v1/upload/drivers/kyc/drv_dl_sample
-
DELETE {{baseUrl}}/api/v1/upload/uploads/sample_photo
Request Body Schema
None (DELETE request)
Response Body Schema (200 OK)
Response Examples
1. 200 OK — Image Deleted Successfully
2. 404 Not Found — Image Not Found on Cloudinary
When the specified publicId does not exist on Cloudinary:
3. 400 Bad Request — Missing publicId
4. 502 Bad Gateway — Cloudinary Service Error
Status Codes Reference
Authentication
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.