Skip to content

Delete process

Endpoint

DELETE /organizations/{org_id}/runs/{run_id}/delete

This endpoint permanently deletes a specific Tallyfy process instance (run) and all its associated data (tasks, comments, form field values, etc.).

Request

Replace {org_id} with your Organization ID and {run_id} with the ID of the process run to delete permanently.

Headers

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

Body

No request body is needed for this DELETE request.

Code samples

const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
const orgId = 'YOUR_ORGANIZATION_ID';
const runId = 'PROCESS_RUN_ID_TO_DELETE';
const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/runs/${runId}/delete`; // Note the /delete path segment
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 => {
// Expect 200 OK or 204 No Content on successful deletion
if (response.status === 200 || response.status === 204) {
console.log(`Successfully deleted process ${runId}. Status: ${response.status}`);
// Body might be empty or contain success message
if (response.status !== 204) {
// Try parse if not 204, but handle non-JSON text
return response.text().then(text => {
try {
return text ? JSON.parse(text) : null;
} catch (e) {
console.warn("Delete response body was not JSON:", text);
return null; // Success but no parsable data
}
});
}
return null; // For 204 No Content
} else {
// Try to parse error JSON, fallback to text
return response.json()
.catch(() => response.text())
.then(errData => {
console.error(`Failed to delete process ${runId}. Status: ${response.status}`, errData);
throw new Error(`HTTP error! status: ${response.status}`);
});
}
})
.then(data => {
if (data) {
console.log('Delete response details (if returned):');
console.log(JSON.stringify(data, null, 2));
}
})
.catch(error => {
console.error(`Error during deletion of process ${runId}:`, error.message);
});

Response

A successful permanent deletion typically returns a 200 OK or 204 No Content status code.

  • If 200 OK, the body might contain a success message.
  • If 204 No Content, the deletion was successful, and there is no response body.

If the process run ID is not found or you lack permission, an error (404, 403) will be returned.


Processes > Archive process

This DELETE endpoint archives a Tallyfy process instance by hiding it from default views while preserving all data for potential future restoration and returns the archived process details with an updated status and timestamp upon successful completion.

Tasks > Delete task

A DELETE endpoint permanently removes standalone tasks while preserving process-related tasks that can only be deleted through their parent process run deletion.

Tasks > Archive task

A DELETE endpoint that archives standalone tasks by hiding them from default views while preserving data for potential future restoration through authenticated API requests and returns 200 or 204 status codes upon success.

Templates > Archive or delete template

Templates can be removed via API through either archiving (soft delete that hides the template while preserving data and allowing restoration) or permanent deletion (irreversible removal of all template data) using DELETE requests to different endpoints with appropriate authentication headers.