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 archives standalone tasks by hiding them from default views while preserving data for potential future restoration through authenticated API requests with provided code examples in multiple programming languages.

Processes > Delete process

A DELETE endpoint permanently removes a specific process instance and its associated data with authentication headers returning either 200 OK or 204 No Content status codes upon successful deletion.

Tasks > Reopen task

A comprehensive guide for reopening completed tasks through DELETE requests with authentication headers showcasing implementation examples in JavaScript Python Java and Go.

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.