Tallyfy’s API provides two GET endpoints for retrieving uploaded files: one that returns the…
Delete file
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.
Replace {org_id} with your Organization ID and {asset_id} with the Asset ID of the file you want to delete.
| Header | Value | Required |
|---|---|---|
Authorization | Bearer {your_access_token} | Yes |
Accept | application/json | Yes |
X-Tallyfy-Client | APIClient | Yes |
You don’t need a request body.
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);});import requestsimport os
access_token = os.environ.get('TALLYFY_ACCESS_TOKEN', 'YOUR_PERSONAL_ACCESS_TOKEN')org_id = os.environ.get('TALLYFY_ORG_ID', 'YOUR_ORGANIZATION_ID')asset_id = 'ASSET_ID_TO_DELETE'api_url = f'https://go.tallyfy.com/api/organizations/{org_id}/file/{asset_id}'
headers = { 'Authorization': f'Bearer {access_token}', 'Accept': 'application/json', 'X-Tallyfy-Client': 'APIClient'}
try: response = requests.delete(api_url, headers=headers) response.raise_for_status() print(f'Deleted file {asset_id}. Status: {response.status_code}')except requests.exceptions.RequestException as e: print(f'Request failed for asset {asset_id}: {e}') if e.response is not None: print(f'Status: {e.response.status_code}, Body: {e.response.text}')import java.net.URI;import java.net.http.HttpClient;import java.net.http.HttpRequest;import java.net.http.HttpResponse;import java.io.IOException;
public class DeleteFile { public static void main(String[] args) { String accessToken = System.getenv().getOrDefault("TALLYFY_ACCESS_TOKEN", "YOUR_PERSONAL_ACCESS_TOKEN"); String orgId = System.getenv().getOrDefault("TALLYFY_ORG_ID", "YOUR_ORGANIZATION_ID"); String assetId = "ASSET_ID_TO_DELETE"; String apiUrl = String.format( "https://go.tallyfy.com/api/organizations/%s/file/%s", orgId, assetId);
HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create(apiUrl)) .header("Authorization", "Bearer " + accessToken) .header("Accept", "application/json") .header("X-Tallyfy-Client", "APIClient") .DELETE() .build();
try { HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString()); if (response.statusCode() == 200) { System.out.println("Deleted file " + assetId); } else { System.err.println("Failed: " + response.statusCode() + " " + response.body()); } } catch (IOException | InterruptedException e) { System.err.println("Request failed: " + e.getMessage()); Thread.currentThread().interrupt(); } }}package main
import ( "fmt" "io" "net/http" "os" "time")
func main() { accessToken := os.Getenv("TALLYFY_ACCESS_TOKEN") if accessToken == "" { accessToken = "YOUR_PERSONAL_ACCESS_TOKEN" } orgId := os.Getenv("TALLYFY_ORG_ID") if orgId == "" { orgId = "YOUR_ORGANIZATION_ID" } assetId := "ASSET_ID_TO_DELETE" apiUrl := fmt.Sprintf( "https://go.tallyfy.com/api/organizations/%s/file/%s", orgId, assetId)
client := &http.Client{Timeout: 10 * time.Second} req, err := http.NewRequest(http.MethodDelete, apiUrl, nil) if err != nil { fmt.Printf("Error creating request: %v\n", err) return }
req.Header.Set("Authorization", "Bearer "+accessToken) req.Header.Set("Accept", "application/json") req.Header.Set("X-Tallyfy-Client", "APIClient")
resp, err := client.Do(req) if err != nil { fmt.Printf("Error making request: %v\n", err) return } defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body) if resp.StatusCode == http.StatusOK { fmt.Printf("Deleted file %s\n", assetId) } else { fmt.Printf("Failed: %d\nBody: %s\n", resp.StatusCode, string(body)) }}#include <iostream>#include <string>#include <cpprest/http_client.h>
using namespace web;using namespace web::http;using namespace web::http::client;
pplx::task<void> DeleteAsset(const utility::string_t& assetId){ utility::string_t accessToken = U("YOUR_PERSONAL_ACCESS_TOKEN"); utility::string_t orgId = U("YOUR_ORGANIZATION_ID"); utility::string_t apiUrl = U("https://go.tallyfy.com/api/organizations/") + orgId + U("/file/") + assetId;
http_client client(apiUrl); http_request request(methods::DEL); request.headers().add(U("Authorization"), U("Bearer ") + accessToken); request.headers().add(U("Accept"), U("application/json")); request.headers().add(U("X-Tallyfy-Client"), U("APIClient"));
return client.request(request).then([assetId](http_response response) { if (response.status_code() == status_codes::OK) { std::wcout << L"Deleted file " << assetId << std::endl; } else { return response.extract_string().then([response, assetId](utility::string_t body) { std::wcerr << L"Failed: " << response.status_code() << L" " << body << std::endl; }); } return pplx::task_from_result(); });}
int main(){ try { DeleteAsset(U("ASSET_ID_TO_DELETE")).wait(); } catch (const std::exception &e) { std::cerr << "Error: " << e.what() << std::endl; } return 0;}// Requires C++ REST SDK (Casablanca)using System;using System.Net.Http;using System.Net.Http.Headers;using System.Threading.Tasks;
public class DeleteFile{ private static readonly HttpClient client = new HttpClient();
public static async Task Main(string[] args) { var accessToken = Environment.GetEnvironmentVariable("TALLYFY_ACCESS_TOKEN") ?? "YOUR_PERSONAL_ACCESS_TOKEN"; var orgId = Environment.GetEnvironmentVariable("TALLYFY_ORG_ID") ?? "YOUR_ORGANIZATION_ID"; var assetId = "ASSET_ID_TO_DELETE"; var apiUrl = $"https://go.tallyfy.com/api/organizations/{orgId}/file/{assetId}";
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken); client.DefaultRequestHeaders.Accept.Clear(); client.DefaultRequestHeaders.Accept.Add( new MediaTypeWithQualityHeaderValue("application/json")); client.DefaultRequestHeaders.Add("X-Tallyfy-Client", "APIClient");
try { var response = await client.DeleteAsync(apiUrl); if (response.IsSuccessStatusCode) { Console.WriteLine($"Deleted file {assetId}"); } else { var body = await response.Content.ReadAsStringAsync(); Console.WriteLine($"Failed: {response.StatusCode} {body}"); } } catch (HttpRequestException e) { Console.WriteLine($"Request failed: {e.Message}"); } }}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.
Tallyfy’s DELETE API endpoint at
/organizations/[org_id]/tags/[tag_id] permanently removes a… Tallyfy’s API lets you permanently delete a standalone one-off task along with its form fields…
Tallyfy’s DELETE endpoint at /organizations/[org_id]/groups/[group_id] permanently removes a…
Was this helpful?
About Tallyfy
- 2025 Tallyfy, Inc.
- Privacy Policy
- Terms of Use
- Report Issue
- Trademarks