Permanently Delete File

View as Markdown
## Permanently Delete File Permanently deletes a file from the system. This action **cannot be undone**. **Method:** `DELETE` **URL:** `{{base_url}}/files/{{file_id}}/force` --- ## Authentication This endpoint requires authentication. - **Recommended:** Bearer token in the `Authorization` header: ``` http Authorization: Bearer {{access_token}} ``` Notes: - If your collection/folder already sets auth, this request can **inherit auth**. - Ensure `{{access_token}}` is a valid, non-expired token. --- ## Required variables Set these variables at the **environment** or **collection** level: | Variable | Required | Description | | --- | --- | --- | | `base_url` | Yes | Base API URL (e.g. `https://app.getgabs.com/partners/wp-gallery/manage`) | | `access_token` | Yes | Access token used to authorize the request | | `file_id` | Yes | ID of the file to permanently delete | --- ## Path Parameters | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `file_id` | integer | Yes | Unique identifier of the file to permanently delete | Example request URL: ``` {{base_url}}/files/34/force ``` --- ## Sample request ``` bash curl --request DELETE "{{base_url}}/files/{{file_id}}/force" \ --header "Authorization: Bearer {{access_token}}" ``` --- ## Sample success response A successful request typically returns **HTTP 200 OK**. ``` json { "success": true, "message": "File permanently deleted" } ``` --- ## Common errors - **400 Bad Request** - Invalid or missing `file_id` - **401 Unauthorized / 403 Forbidden** - Missing/invalid `Authorization` header - Expired `{{access_token}}` - **404 Not Found** - File with the given `file_id` does not exist --- ## Notes - This endpoint **permanently deletes the file** from the system and storage. - The file **cannot be restored after this operation**. - Typically used for files that are already in **trash** and need to be removed permanently. - Use the **Delete File (Move to Trash)** endpoint first if you want a reversible deletion.

Response

OK
messagestring
successboolean