Skip to content

Delete task

Endpoint

DELETE /organizations/{org_id}/tasks/{task_id}/delete

This endpoint permanently deletes a standalone (“one-off”) task. This action cannot be undone.

Request

Replace {org_id} with your Organization ID and {task_id} with the ID of the one-off task 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 taskId = 'ONE_OFF_TASK_ID_TO_DELETE';
const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/tasks/${taskId}/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 204 No Content for successful deletion
if (response.status === 204) {
console.log(`Successfully permanently deleted one-off task ${taskId}. Status: ${response.status}`);
return null; // No body expected for 204
} else {
// Try to parse error JSON, fallback to text
return response.json()
.catch(() => response.text())
.then(errData => {
console.error(`Failed to delete task ${taskId}. Status: ${response.status}`, errData);
throw new Error(`HTTP error! status: ${response.status}`);
});
}
})
.catch(error => {
console.error(`Error deleting one-off task ${taskId}:`, error.message);
});

Response

A successful permanent deletion request returns a 204 No Content status code, and no response body.

If the task ID doesn’t exist, is not a one-off task, or you lack permission, an appropriate error status code (404, 403, 400) will be returned, potentially with an error message in the response body.


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.

Processes > Delete process

The DELETE endpoint permanently removes a process run instance and its associated data including tasks comments and form values with no option for recovery.

Tasks > Reopen task

The endpoint allows reopening completed tasks by using DELETE requests to restore them to an active state with proper authentication headers and supports both process-run tasks and standalone one-off tasks through distinct URL patterns.

Files > Delete file

A DELETE endpoint that removes uploaded files from tasks or kick-off forms by making authorized requests to either /organizations/[org_id]/file/[asset_id] or /organizations/[org]/assets/[assetID] endpoints and returns a 200 OK status code upon successful deletion.