Skip to content

Reopen task

Endpoint

Reopen a completed Tallyfy task by sending a DELETE request to the completed-tasks resource. This sets the task’s status back to in-progress and clears completion data (completed_at, completer_id, and is_approved all become null).

  • Process task: DELETE /organizations/{org_id}/runs/{run_id}/completed-tasks/{task_id}
  • One-off task: DELETE /organizations/{org_id}/completed-tasks/{task_id}

Replace {org_id}, {run_id} (if applicable), and {task_id} with your actual IDs.

Request

Headers

  • Authorization: Bearer {your_access_token}
  • Accept: application/json
  • X-Tallyfy-Client: APIClient

Body

No request body is needed.

Code samples

const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
const orgId = 'YOUR_ORGANIZATION_ID';
const runId = 'PROCESS_RUN_ID'; // Set to null or omit for one-off task
const taskId = 'TASK_ID_TO_REOPEN';
const apiUrl = runId
? `https://go.tallyfy.com/api/organizations/${orgId}/runs/${runId}/completed-tasks/${taskId}`
: `https://go.tallyfy.com/api/organizations/${orgId}/completed-tasks/${taskId}`;
const headers = new Headers();
headers.append('Authorization', `Bearer ${accessToken}`);
headers.append('Accept', 'application/json');
headers.append('X-Tallyfy-Client', 'APIClient');
fetch(apiUrl, {
method: 'DELETE', // Use DELETE method on completed-tasks endpoint
headers: headers
})
.then(response => {
return response.json().then(data => { // Attempt to parse JSON regardless of status
if (!response.ok) { // Check for 200 OK on success
console.error(`Failed to reopen task ${taskId}:`, data);
throw new Error(`HTTP error! status: ${response.status}`);
}
console.log(`Successfully reopened task ${taskId}. Status: ${response.status}`);
return data; // Reopen might return the updated task state
});
})
.then(data => {
if(data) {
console.log('Reopened task details:');
console.log(JSON.stringify(data, null, 2));
}
})
.catch(error => {
console.error(`Error reopening task ${taskId}:`, error.message);
});

Response

A 200 OK response returns the task details, now back in in-progress status.

{
"data": {
"id": "TASK_ID_TO_REOPEN",
"title": "Review Proposal",
"status": "in-progress",
"completed_at": null,
"completer_id": null,
"is_approved": null,
// ... other task properties ...
}
}

If the task isn’t currently completed or the ID is invalid, you’ll get an error status.


Tasks > Complete task

This documentation explains how to mark Tallyfy tasks as complete using POST requests to different endpoints for process tasks versus one-off tasks with options to include approval status and final form field updates in the request payload.

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.

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.

Tasks > Get task

This API endpoint retrieves complete details for a specific Tallyfy task by its unique ID and supports optional query parameters to include related data like process run information and form fields while returning a JSON response containing task properties such as title status owners and deadline.