Goatlab API Docs

Delete a file

DELETE
/v1/files/{file_id}

This endpoint allows you to delete a file that was previously uploaded. You must provide the file ID in the path and the user ID in the headers. The file will be permanently deleted from the storage.

Authorization

ApiTokenAuth PRODUCT
x-api-key<token>

API Key with role based permission

In: header

Scope: PRODUCT

Path Parameters

file_id*string

The ID of the file to delete

Header Parameters

x-user-id*string

The ID of the user requesting the deletion

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/v1/files/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "x-user-id: string"
{
  "message": "File deleted successfully"
}
{
  "message": "Invalid file ID format"
}
{
  "message": "Invalid API Key"
}
{
  "message": "File with ID '123e4567-e89b-12d3-a456-426614174000' not found"
}
{
  "message": "Internal Server Error"
}