Skip to content

Delete process

Endpoint

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

This endpoint permanently deletes a specific 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

A DELETE endpoint archives process instances by hiding them from default views while retaining data for future restoration through authenticated API requests requiring organization and run IDs.

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.

Processes > Get process

A GET endpoint retrieves detailed information about a specific process run using organization and run IDs with optional parameters to include related data such as checklists tasks tags and form field values.

Templates > Archive or delete template

The API supports template removal through archiving which retains data and permanent deletion which irreversibly removes all template information and its associated data.