Skip to content

Get task

Endpoint

GET /organizations/{org_id}/tasks/{task_id}

Retrieves a single task by its ID. This works for both standalone (one-off) tasks and process tasks. For process tasks, you can also use GET /organizations/{org_id}/runs/{run_id}/tasks/{task_id}.

Request

Replace {org_id} with your Organization ID and {task_id} with the task’s unique ID.

Headers

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

Query parameters (optional)

  • with (string): Comma-separated list of related data to include. Options: run, step, form_fields, tags, threads, issues, assets, folders, roles, activities, ko-form-fields, summary, member_watchers, guest_watchers, threads_count. Example: with=run,step,form_fields.

Code samples

const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
const orgId = 'YOUR_ORGANIZATION_ID';
const taskId = 'TASK_ID_TO_GET';
const queryParams = '?with=run,step,form_fields,tags';
const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/tasks/${taskId}${queryParams}`;
const headers = new Headers();
headers.append('Authorization', `Bearer ${accessToken}`);
headers.append('Accept', 'application/json');
headers.append('X-Tallyfy-Client', 'APIClient');
fetch(apiUrl, { method: 'GET', headers })
.then(response => {
return response.json().then(data => {
if (!response.ok) {
console.error(`Failed to get task ${taskId}:`, data);
throw new Error(`HTTP error! status: ${response.status}`);
}
return data;
});
})
.then(data => {
console.log(`Successfully retrieved task ${taskId}:`);
console.log(JSON.stringify(data, null, 2));
})
.catch(error => {
console.error(`Error getting task ${taskId}:`, error.message);
});

Response

Returns a 200 OK with a JSON object containing a data field that holds the task’s full details.

{
"data": {
"id": "task_id_abc",
"increment_id": 1205,
"title": "Review Proposal",
"run_id": "run_id_xyz",
"checklist_id": "checklist_id_123",
"step_id": "step_id_456",
"alias": "review-proposal",
"status": "active",
"status_label": "Active",
"task_type": "task",
"is_oneoff_task": false,
"is_completable": true,
"is_approved": false,
"owners": {
"users": [1234],
"guests": [],
"groups": []
},
"position": 1,
"started_at": "2025-01-10T09:00:00Z",
"deadline": "2025-01-15T17:00:00Z",
"created_at": "2025-01-10T09:00:00Z",
"last_updated": "2025-01-12T14:30:00Z",
"completed_at": null,
"archived_at": null,
"starter_id": 1234,
"completer_id": null,
"everyone_must_complete": false,
"can_complete_only_assignees": true,
"max_assignable": 1,
"webhook": null,
"top_secret": false,
"form_fields": {
"data": [
{
"id": "capture_id_abc",
"label": "Approval Status",
"field_type": "dropdown",
"value": { "id": 1, "text": "Approved" },
"required": true
}
]
},
"run": { "data": { "...": "process run details" } },
"step": { "data": { "...": "template step details" } }
}
}

The form_fields, run, and step objects only appear when you request them via the with parameter. If the task isn’t found, you’ll get a 404. If you lack permission, expect a 403.


Processes > Get process

Tallyfy’s GET endpoint lets you retrieve full details of a specific process run by its ID and optionally include related data like tasks and form fields and tags through query parameters while also supporting a special “next_task” option that returns the earliest-deadline incomplete task for building dashboards or automating notifications.

Tags > Get tag

Tallyfy’s API lets you retrieve a specific tag by its ID using a GET request to /organizations/[org_id]/tags/[tag_id] and optionally include usage statistics showing how many active or archived templates and processes use that tag.

Templates > Get template

Tallyfy’s API lets you fetch full details of any process template by its unique ID using a GET request and optionally include related data like steps and tags through query parameters.

Tasks > List process tasks

Tallyfy’s API lets you retrieve all tasks for a specific process run via a GET request with optional filters for status and deadlines and owners and sorting and pagination along with the ability to include related data like form fields and step details in the response.