Skip to content

Delete file

Endpoint

DELETE /organizations/{org_id}/file/{asset_id}

This endpoint permanently deletes an uploaded file (asset) in Tallyfy. It removes both the asset record and the underlying file from storage.

Request

Replace {org_id} with your Organization ID and {asset_id} with the Asset ID of the file you want to delete.

Headers

HeaderValueRequired
AuthorizationBearer {your_access_token}Yes
Acceptapplication/jsonYes
X-Tallyfy-ClientAPIClientYes

Body

You don’t need a request body.

Code samples

const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
const orgId = 'YOUR_ORGANIZATION_ID';
const assetId = 'ASSET_ID_TO_DELETE';
const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/file/${assetId}`;
const headers = new Headers();
headers.append('Authorization', `Bearer ${accessToken}`);
headers.append('Accept', 'application/json');
headers.append('X-Tallyfy-Client', 'APIClient');
fetch(apiUrl, {
method: 'DELETE',
headers: headers
})
.then(response => {
if (response.ok) {
console.log(`Deleted file ${assetId}. Status: ${response.status}`);
} else {
return response.json().then(errData => {
console.error(`Error deleting file ${assetId}:`, errData);
});
}
})
.catch(error => {
console.error(`Request failed for ${assetId}:`, error.message);
});

Response

A successful request returns a 200 OK status code with an empty response body, confirming the file has been deleted from both the Tallyfy record and storage.

Files > Download file

Tallyfy’s API provides two GET endpoints for retrieving uploaded files: one that returns the…

Tags > Delete tag

Tallyfy’s DELETE API endpoint at /organizations/[org_id]/tags/[tag_id] permanently removes a…

Tasks > Delete task

Tallyfy’s API lets you permanently delete a standalone one-off task along with its form fields…

Groups > Delete group

Tallyfy’s DELETE endpoint at /organizations/[org_id]/groups/[group_id] permanently removes a…