Delete a file from a space
Permanently deletes a file from the specified space. This action removes the file from storage, the database, and any associated vector embeddings.
Access Control:
Access to delete files from a space depends on your permissions and the space's visibility:
- Private Spaces: Only accessible by the space owner
- Public Spaces: Accessible by all users within the same tenant
You must provide valid authentication credentials (API key, tenant ID, and user ID) to delete any file.
Authorization
ApiTokenAuth PRODUCTx-api-key<token>
API Key with role based permission
In: header
Scope: PRODUCT
Path Parameters
spaceId*string
The unique identifier of the space containing the file
fileId*string
The unique identifier of the file to delete
Header Parameters
x-user-id*string
The ID of the user requesting the deletion
x-tenant-id*string
The ID of the tenant
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/v1/spaces/497f6eca-6276-4993-bfeb-53cbbbba6f08/files/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "x-user-id: string" \ -H "x-tenant-id: string"{
"message": "File deleted successfully"
}{
"message": "x-user-id is required"
}{
"message": "Invalid API Key"
}{
"message": "Invalid API Key"
}{
"message": "string"
}{
"message": "Internal Server Error"
}