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

The DELETE endpoint enables archiving of process instances by hiding them from default views while maintaining data accessibility for future restoration through authenticated API requests.

Tasks > Delete task

An API endpoint that permanently deletes standalone tasks through DELETE requests with mandatory authorization headers and returns a 204 status code upon successful deletion.

Processes > Get process

An API endpoint that retrieves detailed information about a specific process run through a GET request with optional parameters to include related data like checklists tasks and tags in the response.

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.