/runs/[run_id]/delete endpoint with code samples provided in six languages. Archive process
DELETE /organizations/{org_id}/runs/{run_id}
This endpoint archives (soft-deletes) a process. The process won’t appear in default views, but all its data - tasks, comments, form values - stays intact. You can restore it later with PUT .../runs/{run_id}/activate.
Replace {org_id} with your Organization ID and {run_id} with the process run ID.
Authorization: Bearer {your_access_token}Accept: application/jsonX-Tallyfy-Client: APIClient
No request body needed.
const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';const orgId = 'YOUR_ORGANIZATION_ID';const runId = 'PROCESS_RUN_ID_TO_ARCHIVE';const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/runs/${runId}`;
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 => { return response.json().then(data => { if (!response.ok) { console.error(`Failed to archive process ${runId}:`, data); throw new Error(`HTTP error! status: ${response.status}`); } console.log(`Archived process ${runId}. Status: ${response.status}`); return data; });}).then(data => { console.log('Archived process details:'); console.log(JSON.stringify(data, null, 2));}).catch(error => { console.error(`Error archiving process ${runId}:`, error.message);});import requestsimport jsonimport os
access_token = os.environ.get('TALLYFY_ACCESS_TOKEN', 'YOUR_PERSONAL_ACCESS_TOKEN')org_id = os.environ.get('TALLYFY_ORG_ID', 'YOUR_ORGANIZATION_ID')run_id = 'PROCESS_RUN_ID_TO_ARCHIVE'api_url = f'https://go.tallyfy.com/api/organizations/{org_id}/runs/{run_id}'
headers = { 'Authorization': f'Bearer {access_token}', 'Accept': 'application/json', 'X-Tallyfy-Client': 'APIClient'}
response = Nonetry: response = requests.delete(api_url, headers=headers) response.raise_for_status()
print(f'Archived process {run_id}. Status: {response.status_code}') if response.content: archived_process = response.json() print(json.dumps(archived_process, indent=4))
except requests.exceptions.HTTPError as http_err: print(f"HTTP error archiving process {run_id}: {http_err}") if response is not None: print(f"Response Body: {response.text}")except requests.exceptions.RequestException as req_err: print(f"Request failed archiving process {run_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 ArchiveProcess { 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 runId = "PROCESS_RUN_ID_TO_ARCHIVE"; String apiUrl = String.format("https://go.tallyfy.com/api/organizations/%s/runs/%s", orgId, runId);
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("Archived process " + runId); if (response.body() != null && !response.body().isEmpty()) { System.out.println(response.body()); } } else { System.err.println("Failed to archive process " + runId + ". 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 ( "bytes" "encoding/json" "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" } runId := "PROCESS_RUN_ID_TO_ARCHIVE" apiUrl := fmt.Sprintf("https://go.tallyfy.com/api/organizations/%s/runs/%s", orgId, runId)
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()
body, err := io.ReadAll(resp.Body) if err != nil { fmt.Printf("Error reading response body: %v\n", err) }
if resp.StatusCode == http.StatusOK { fmt.Printf("Archived process %s\n", runId) var prettyJSON bytes.Buffer if err := json.Indent(&prettyJSON, body, "", " "); err == nil { fmt.Println(prettyJSON.String()) } else { fmt.Println(string(body)) } } else { fmt.Printf("Failed to archive process %s. Status: %d\nBody: %s\n", runId, 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> ArchiveTallyfyProcess(const utility::string_t& runId){ 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("/runs/") + runId;
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([runId](http_response response) { status_code status = response.status_code(); return response.extract_string().then([status, runId](utility::string_t responseBody) { if (status == status_codes::OK) { std::wcout << L"Archived process " << runId << std::endl; if (!responseBody.empty()) { std::wcout << responseBody << std::endl; } } else { std::wcerr << L"Failed to archive process " << runId << L". Status: " << status << std::endl; std::wcerr << L"Response: " << responseBody << std::endl; throw std::runtime_error("Failed to archive process"); } }); });}
int main() { try { ArchiveTallyfyProcess(U("PROCESS_RUN_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;using System.Text.Json;
public class TallyfyProcessArchiver{ private static readonly HttpClient client = new HttpClient();
public static async Task ArchiveProcessAsync(string runId) { 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}/runs/{runId}";
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); string responseBody = await response.Content.ReadAsStringAsync();
if (response.IsSuccessStatusCode) { Console.WriteLine($"Archived process {runId}. Status: {response.StatusCode}"); if (!string.IsNullOrWhiteSpace(responseBody)) { try { using var doc = JsonDocument.Parse(responseBody); Console.WriteLine(JsonSerializer.Serialize(doc.RootElement, new JsonSerializerOptions { WriteIndented = true })); } catch (JsonException) { Console.WriteLine(responseBody); } } } else { Console.WriteLine($"Failed to archive process {runId}. Status: {response.StatusCode}"); Console.WriteLine($"Response: {responseBody}"); } } catch (HttpRequestException e) { Console.WriteLine($"Request error: {e.Message}"); } }
// static async Task Main(string[] args) => await ArchiveProcessAsync("PROCESS_RUN_ID_TO_ARCHIVE");}A 200 OK response with the archived process details wrapped in a data object. The status field changes to archived and archived_at gets a timestamp.
{ "data": { "id": "PROCESS_RUN_ID_TO_ARCHIVE", "name": "Old Completed Project", "status": "archived", "archived_at": "2024-06-15T10:30:00.000Z", "checklist_id": "template_timeline_id", "progress": 75, "started_by": "user_id", "owner_id": "user_id", "created_at": "2024-01-10T08:00:00.000Z", "last_updated": "2024-06-15T10:30:00.000Z" }}If the run ID isn’t found or you don’t have permission, you’ll get a 404 or 403 error. Archiving also soft-deletes associated tasks, threads, and assets - all of which get restored when you reactivate the process.
Code Samples > Managing processes (Runs)
archived_at field and brings the run back into default views while preserving its original status. /organizations/[org_id]/tasks/[task_id] which hides it from default views while preserving all data and allowing restoration later through a separate restore endpoint. Was this helpful?
- 2025 Tallyfy, Inc.
- Privacy Policy
- Terms of Use
- Report Issue
- Trademarks