Tallyfy’s API lets you permanently delete a standalone one-off task along with all its form fields and captured values by sending a DELETE request to the task’s endpoint which returns a 204 No Content response on success and cannot be undone.
Archive task
DELETE /organizations/{org_id}/tasks/{task_id}
This endpoint soft-deletes (archives) a standalone one-off task. The task won’t appear in default views, but its data is preserved. You can restore it later with PUT /organizations/{org_id}/tasks/{task_id}/restore.
Replace {org_id} with your Organization ID and {task_id} with the task ID to archive.
Authorization: Bearer {your_access_token}Accept: application/jsonX-Tallyfy-Client: APIClient
No request body is needed.
const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';const orgId = 'YOUR_ORGANIZATION_ID';const taskId = 'TASK_ID_TO_ARCHIVE';const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/tasks/${taskId}`;
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.status === 204) { console.log(`Archived task ${taskId}. Status: 204 No Content`); return null; } else { return response.json() .catch(() => response.text()) .then(errData => { console.error(`Failed to archive task ${taskId}. Status: ${response.status}`, errData); throw new Error(`HTTP error! status: ${response.status}`); }); }}).catch(error => { console.error(`Error archiving task ${taskId}:`, 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')task_id = 'TASK_ID_TO_ARCHIVE'api_url = f'https://go.tallyfy.com/api/organizations/{org_id}/tasks/{task_id}'
headers = { 'Authorization': f'Bearer {access_token}', 'Accept': 'application/json', 'X-Tallyfy-Client': 'APIClient'}
try: response = requests.delete(api_url, headers=headers)
if response.status_code == 204: print(f'Archived task {task_id}. Status: 204 No Content') else: response.raise_for_status()
except requests.exceptions.HTTPError as http_err: print(f"HTTP error archiving task {task_id}: {http_err}") print(f"Response: {response.text}")except requests.exceptions.RequestException as req_err: print(f"Request failed archiving task {task_id}: {req_err}")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 ArchiveOneOffTask { 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 taskId = "TASK_ID_TO_ARCHIVE"; String apiUrl = String.format("https://go.tallyfy.com/api/organizations/%s/tasks/%s", orgId, taskId);
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() == 204) { System.out.println("Archived task " + taskId + ". Status: 204 No Content"); } else { System.err.println("Failed to archive task " + taskId + ". Status: " + response.statusCode()); System.err.println("Response: " + 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" } taskId := "TASK_ID_TO_ARCHIVE" apiUrl := fmt.Sprintf("https://go.tallyfy.com/api/organizations/%s/tasks/%s", orgId, taskId)
client := &http.Client{Timeout: 15 * 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 executing request: %v\n", err) return } defer resp.Body.Close()
if resp.StatusCode == http.StatusNoContent { fmt.Printf("Archived task %s. Status: 204 No Content\n", taskId) } else { body, _ := io.ReadAll(resp.Body) fmt.Printf("Failed to archive task %s. Status: %d\nBody: %s\n", taskId, resp.StatusCode, string(body)) }}#include <iostream>#include <string>#include <cpprest/http_client.h>#include <cpprest/json.h>
using namespace web;using namespace web::http;using namespace web::http::client;
pplx::task<void> ArchiveTallyfyTask(const utility::string_t& taskId){ 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("/tasks/") + taskId;
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([taskId](http_response response) { status_code status = response.status_code(); if (status == status_codes::NoContent) { std::wcout << L"Archived task " << taskId << L". Status: 204 No Content." << std::endl; } else { return response.extract_string().then([status, taskId](utility::string_t body) { std::wcerr << L"Failed to archive task " << taskId << L". Status: " << status << std::endl; std::wcerr << L"Response: " << body << std::endl; }); } return pplx::task_from_result(); });}
int main() { try { ArchiveTallyfyTask(U("TASK_ID_TO_ARCHIVE")).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 TallyfyTaskArchiver{ private static readonly HttpClient client = new HttpClient();
public static async Task ArchiveTaskAsync(string taskId) { var accessToken = Environment.GetEnvironmentVariable("TALLYFY_ACCESS_TOKEN") ?? "YOUR_PERSONAL_ACCESS_TOKEN"; var orgId = Environment.GetEnvironmentVariable("TALLYFY_ORG_ID") ?? "YOUR_ORGANIZATION_ID"; var apiUrl = $"https://go.tallyfy.com/api/organizations/{orgId}/tasks/{taskId}";
try { using var request = new HttpRequestMessage(HttpMethod.Delete, apiUrl); request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", accessToken); request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); request.Headers.Add("X-Tallyfy-Client", "APIClient");
HttpResponseMessage response = await client.SendAsync(request);
if (response.StatusCode == System.Net.HttpStatusCode.NoContent) { Console.WriteLine($"Archived task {taskId}. Status: 204 No Content"); } else { string responseBody = await response.Content.ReadAsStringAsync(); Console.WriteLine($"Failed to archive task {taskId}. Status: {response.StatusCode}"); Console.WriteLine($"Response: {responseBody}"); } } catch (HttpRequestException e) { Console.WriteLine($"Request error archiving task {taskId}: {e.Message}"); } }
// Example Usage: // static async Task Main(string[] args) // { // await ArchiveTaskAsync("TASK_ID_TO_ARCHIVE"); // }}A successful request returns a 204 No Content status with an empty response body. The task is soft-deleted — its deleted_at timestamp gets set, hiding it from default views while keeping all data intact.
Tallyfy’s API lets you soft-delete (archive) a running process via a DELETE request so it disappears from default views while preserving all tasks and data intact and can be fully restored later using the activate endpoint.
Templates > Archive or delete template
Tallyfy’s API supports removing templates through a two-step process: first archiving (soft delete) via a DELETE request to the checklist endpoint which hides the template while preserving data and allowing restoration and then permanently deleting it via a second DELETE request with an extra
/delete path segment which irreversibly removes all associated data and requires admin permissions. Tallyfy’s API lets admins permanently and irreversibly delete an already-archived process run along with all its associated tasks and data by sending a DELETE request to the
/runs/[run_id]/delete endpoint with code samples provided in six languages. Was this helpful?
About Tallyfy
- 2025 Tallyfy, Inc.
- Privacy Policy
- Terms of Use
- Report Issue
- Trademarks