Skip to content

Archive process

Endpoint

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.

Request

Replace {org_id} with your Organization ID and {run_id} with the process run ID.

Headers

  • Authorization: Bearer {your_access_token}
  • Accept: application/json
  • X-Tallyfy-Client: APIClient

Body

No request body needed.

Code samples

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);
});

Response

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.


Processes > Delete process

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.

Code Samples > Managing processes (Runs)

The Tallyfy API manages processes (called “runs”) through org-scoped endpoints that cover launching from templates or as empty containers and listing and filtering and fetching details and updating and archiving and restoring and permanently deleting processes along with retrieving activity feeds for audit trails.

Processes > Activate process

Tallyfy’s API lets you restore an archived process run by sending a PUT request to the activate endpoint which clears the archived_at field and brings the run back into default views while preserving its original status.

Tasks > Archive task

Tallyfy’s API lets you soft-delete (archive) a standalone one-off task by sending a DELETE request to /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.