Skip to content

Complete task

Endpoint

This endpoint marks a task as complete. The URL differs depending on whether it’s a process task or a standalone task:

  • Process task: POST /organizations/{org_id}/runs/{run_id}/completed-tasks
  • Standalone task: POST /organizations/{org_id}/completed-tasks

Replace {org_id} and {run_id} with your actual IDs.

Request

Headers

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

Body (JSON)

Fields:

  • task_id (string, required) - The ID of the task to complete.
  • is_approved (boolean, required for approval tasks) - Set true to approve, false to reject. Ignored for non-approval tasks.
  • override_user (integer, optional) - User ID to record as the completer instead of the authenticated user.

Note: Form field values can’t be sent in the completion request. Update form fields through the Update Task endpoint before completing. The API validates that all required form fields are filled before allowing completion.

Example body (simple completion):

{
"task_id": "TASK_ID_TO_COMPLETE"
}

Example body (approval task - approve):

{
"task_id": "APPROVAL_TASK_ID",
"is_approved": true
}

Code samples

These examples use the process task endpoint. For standalone tasks, drop the /runs/{run_id} segment from the URL.

const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
const orgId = 'YOUR_ORGANIZATION_ID';
const runId = 'PROCESS_RUN_ID'; // null for standalone tasks
const taskId = 'TASK_ID_TO_COMPLETE';
const apiUrl = runId
? `https://go.tallyfy.com/api/organizations/${orgId}/runs/${runId}/completed-tasks`
: `https://go.tallyfy.com/api/organizations/${orgId}/completed-tasks`;
const payload = {
task_id: taskId,
// is_approved: true, // Required for approval tasks
};
const headers = new Headers();
headers.append('Authorization', `Bearer ${accessToken}`);
headers.append('Accept', 'application/json');
headers.append('X-Tallyfy-Client', 'APIClient');
headers.append('Content-Type', 'application/json');
fetch(apiUrl, {
method: 'POST',
headers: headers,
body: JSON.stringify(payload)
})
.then(response => {
return response.json().then(data => {
if (!response.ok) {
console.error(`Failed to complete task ${taskId}:`, data);
throw new Error(`HTTP error! status: ${response.status}`);
}
console.log(`Task ${taskId} completed. Status: ${response.status}`);
return data;
});
})
.then(data => {
console.log('Completed task details:');
console.log(JSON.stringify(data, null, 2));
})
.catch(error => {
console.error(`Error completing task ${taskId}:`, error.message);
});

Response

A successful request returns 200 OK with the completed task details.

{
"data": {
"id": "TASK_ID_TO_COMPLETE",
"title": "Review Proposal",
"status": "completed",
"completed_at": "2025-05-20T17:00:00.000Z",
"completer_id": 1001,
"tasks_changed_by_rules": {}
}
}

For process tasks, the response includes tasks_changed_by_rules showing any tasks affected by automation rules triggered by this completion. Standalone task responses don’t include this field.

The API returns an error if the task is already completed, the user lacks permission, required form fields aren’t filled, or the task has unresolved issues.


Workato > Complete Tallyfy tasks from Workato

Workato recipes can automatically complete Tallyfy tasks when external events occur by using HTTP POST requests to the completed-tasks API endpoint along with form field data saves and error handling for conditions like missing required fields or rate limits.

Postman > Task operations and automation

Tallyfy’s API lets you list and filter tasks by status or assignee and complete them via a POST to the completed-tasks endpoint while saving form field captures separately and handling file uploads through multipart form-data and managing task assignments and comments programmatically through Postman.

Tasks > Create one-off task

Tallyfy’s API lets you create standalone one-off tasks outside any process by sending a POST request to the tasks endpoint with a title and task type and assignees and deadline as required fields along with optional settings like form fields and webhooks and confidentiality flags.

Tasks > Reopen task

Tallyfy’s API lets you reopen a completed task by sending a DELETE request to the completed-tasks endpoint which effectively removes the completion record and resets the task status back to “in-progress” while clearing out completion-related fields like completed_at and completer_id.