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

Retrieve details for a specific process run by ID, with optional includes for tasks, form fields, and the next upcoming task.

Tags > Get tag

Retrieve a specific tag’s details by ID within your organization, with an optional statistics include.

Templates > Get template

This endpoint retrieves complete details for a specific process template by its unique ID and supports optional query parameters to include related data like steps tags and form fields in the response.

Tasks > List organization tasks

Retrieve all tasks across an organization’s processes and one-off tasks with filtering by status, assignees, deadlines, tags, folders and pagination.