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://api.tallyfy.com/organizations/${orgId}/runs/${runId}/delete`; // Note /delete
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
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) {
return response.text().then(text => text ? JSON.parse(text) : null); // Try parse if not 204
}
return null;
} else {
// Error handling...
return response.json().then(errData => { throw new Error(/*...*/); }).catch(() => { throw new Error(/*...*/); });
}
})
.then(data => {
if (data) {
console.log('Delete response details (if returned):');
console.log(JSON.stringify(data, null, 2));
}
})
.catch(error => {
console.error(`Error deleting process ${runId}:`, error);
});

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.