Get task detail
curl --request GET \
--url https://api.example.com/api/v1/business/tasks/{task_id} \
--header 'Content-Type: application/json' \
--header 'x-project-id: <x-project-id>' \
--data '[]'import requests
url = "https://api.example.com/api/v1/business/tasks/{task_id}"
payload = []
headers = {
"x-project-id": "<x-project-id>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-project-id': '<x-project-id>', 'Content-Type': 'application/json'},
body: JSON.stringify([])
};
fetch('https://api.example.com/api/v1/business/tasks/{task_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/business/tasks/{task_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-project-id: <x-project-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/business/tasks/{task_id}"
payload := strings.NewReader("[]")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("x-project-id", "<x-project-id>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/business/tasks/{task_id}")
.header("x-project-id", "<x-project-id>")
.header("Content-Type", "application/json")
.body("[]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/business/tasks/{task_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-project-id"] = '<x-project-id>'
request["Content-Type"] = 'application/json'
request.body = "[]"
response = http.request(request)
puts response.read_body{
"task": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"title": "<string>",
"description": "<string>",
"status": "backlog",
"priority": "urgent",
"creator_type": "human",
"creator_id": "<string>",
"assignee_type": "human",
"assignee_id": "<string>",
"parent_task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"page_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"schedule_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"due_date": "2023-12-25",
"sort_order": 123,
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"comment_count": 123,
"last_comment_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"labels": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"color": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"thread": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact": {
"name": "<string>",
"email": "<string>",
"role": "<string>"
},
"cc_emails": []
},
"subtask_count": {
"total": 0,
"completed": 0
},
"relation_count": 0,
"attachment_count": 0,
"attachments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"content_type": "<string>",
"size_bytes": 123,
"uploader_type": "human",
"uploader_id": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"hierarchy": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"title": "<string>"
}
],
"last_comment": {
"author_type": "human",
"author_id": "<string>",
"body": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
},
"timeline": {
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"actor_type": "human",
"actor_id": "<string>",
"payload": {
"action": "created",
"field": "<string>",
"old_value": "<string>",
"new_value": "<string>",
"kind": "activity"
}
}
],
"next_cursor": "<string>",
"has_more": true,
"participants": [
{
"actor_type": "human",
"actor_id": "<string>"
}
]
},
"relations": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"relation_type": "depends_on",
"created_at": "2023-11-07T05:31:56Z"
}
],
"approvals": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tool_name": "<string>",
"body": {},
"status": "pending_approval",
"reviewer_user_id": "<string>",
"reviewed_at": "2023-11-07T05:31:56Z",
"feedback_text": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Tasks
Get task detail
Get one task with full detail (attachments and labels are always included).
Pass include to also fetch the task’s timeline, relations, and/or approvals.
timeline_cursor and timeline_kind apply only when the timeline is included.
GET
/
api
/
v1
/
business
/
tasks
/
{task_id}
Get task detail
curl --request GET \
--url https://api.example.com/api/v1/business/tasks/{task_id} \
--header 'Content-Type: application/json' \
--header 'x-project-id: <x-project-id>' \
--data '[]'import requests
url = "https://api.example.com/api/v1/business/tasks/{task_id}"
payload = []
headers = {
"x-project-id": "<x-project-id>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-project-id': '<x-project-id>', 'Content-Type': 'application/json'},
body: JSON.stringify([])
};
fetch('https://api.example.com/api/v1/business/tasks/{task_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/business/tasks/{task_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-project-id: <x-project-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/business/tasks/{task_id}"
payload := strings.NewReader("[]")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("x-project-id", "<x-project-id>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/business/tasks/{task_id}")
.header("x-project-id", "<x-project-id>")
.header("Content-Type", "application/json")
.body("[]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/business/tasks/{task_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-project-id"] = '<x-project-id>'
request["Content-Type"] = 'application/json'
request.body = "[]"
response = http.request(request)
puts response.read_body{
"task": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"title": "<string>",
"description": "<string>",
"status": "backlog",
"priority": "urgent",
"creator_type": "human",
"creator_id": "<string>",
"assignee_type": "human",
"assignee_id": "<string>",
"parent_task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"page_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"schedule_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"due_date": "2023-12-25",
"sort_order": 123,
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"comment_count": 123,
"last_comment_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"labels": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"color": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"thread": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact": {
"name": "<string>",
"email": "<string>",
"role": "<string>"
},
"cc_emails": []
},
"subtask_count": {
"total": 0,
"completed": 0
},
"relation_count": 0,
"attachment_count": 0,
"attachments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"content_type": "<string>",
"size_bytes": 123,
"uploader_type": "human",
"uploader_id": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"hierarchy": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"title": "<string>"
}
],
"last_comment": {
"author_type": "human",
"author_id": "<string>",
"body": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
},
"timeline": {
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"actor_type": "human",
"actor_id": "<string>",
"payload": {
"action": "created",
"field": "<string>",
"old_value": "<string>",
"new_value": "<string>",
"kind": "activity"
}
}
],
"next_cursor": "<string>",
"has_more": true,
"participants": [
{
"actor_type": "human",
"actor_id": "<string>"
}
]
},
"relations": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"relation_type": "depends_on",
"created_at": "2023-11-07T05:31:56Z"
}
],
"approvals": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tool_name": "<string>",
"body": {},
"status": "pending_approval",
"reviewer_user_id": "<string>",
"reviewed_at": "2023-11-07T05:31:56Z",
"feedback_text": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Headers
Project ID for tenant scoping
Overrides the key's workspace
User API key
Path Parameters
Task to fetch.
Query Parameters
Pagination cursor for the task timeline (from a prior response's next_cursor).
Filter the task timeline to one kind: all/comment/activity/approval/workflow.
Available options:
all, comment, activity, approval, workflow, ask_question Body
application/json
Available options:
timeline, relations, attachments, approvals Was this page helpful?
⌘I