Get a task
curl --request GET \
--url https://api.tela.com/task/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tela.com/task/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tela.com/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.tela.com/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_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tela.com/task/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.tela.com/task/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tela.com/task/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "8b6d2c9a-1f4e-4c1b-9a1e-3c2d5e6f7a80",
"reference": 42,
"name": "Invoice-2025-001.pdf",
"status": "completed",
"rawInput": {
"application_id": "95cec438-6080-44fe-8275-28b16bd40178",
"variables": {
"document": {
"files": [
{
"file_url": "https://example.com/invoice.pdf",
"file_name": "Invoice-2025-001.pdf",
"mime_type": "application/pdf"
}
]
}
}
},
"inputContent": {
"variables": {
"document": {
"files": [
{
"file_url": "https://example.com/invoice.pdf",
"file_name": "Invoice-2025-001.pdf",
"mime_type": "application/pdf"
}
]
}
},
"messages": [],
"files": [
{
"name": "document",
"filename": "Invoice-2025-001.pdf",
"url": "https://example.com/invoice.pdf",
"usedAt": "variables",
"mimeType": "application/pdf"
}
]
},
"outputContent": {
"role": "assistant",
"content": {
"cliente": "Acme Corporation",
"valor": 150000,
"dataVencimento": "2025-03-31"
}
},
"originalOutputContent": {
"role": "assistant",
"content": {
"cliente": "Acme Corp",
"valor": 150000,
"dataVencimento": "2025-03-31"
}
},
"createdBy": "api@company.com",
"approvedBy": "reviewer@company.com",
"approvedAt": "2025-01-15T11:00:00.000Z",
"completionRunId": "b83b1558-de5b-4e45-b517-7bececbdd154",
"workflowRunId": null,
"sourceType": "prompt",
"agentId": null,
"agentRef": null,
"agentSessionId": null,
"promptVersionId": "76065caa-c519-441a-8fe2-cc43e29664ab",
"promptApplicationId": "95cec438-6080-44fe-8275-28b16bd40178",
"workspaceId": "3f55cfd9-4427-4887-a181-d9ad39967802",
"metadata": {
"editedFields": [
{
"path": "cliente",
"author": "reviewer@company.com",
"editedAt": "2025-01-15T10:58:00.000Z",
"previousValue": "Acme Corp"
}
]
},
"tags": [
"priority"
],
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T11:00:00.000Z",
"deletedAt": null,
"analytics": {
"taskId": "8b6d2c9a-1f4e-4c1b-9a1e-3c2d5e6f7a80",
"promptApplicationId": "95cec438-6080-44fe-8275-28b16bd40178",
"firstOpenedAt": "2025-01-15T10:45:00.000Z",
"firstOpenedByEmail": "reviewer@company.com",
"approvedAt": "2025-01-15T11:00:00.000Z",
"approvedByEmail": "reviewer@company.com",
"reviewDurationSeconds": 900,
"totalFields": 3,
"fieldsEdited": 1,
"accuracyPercentage": "66.67",
"lastActivityAt": "2025-01-15T11:00:00.000Z",
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T11:00:00.000Z"
}
}Tasks
Get a task
Returns a single task by ID. Soft-deleted tasks return 404. For Workstation/App tasks the caller must have access to the app.
GET
/
task
/
{id}
Get a task
curl --request GET \
--url https://api.tela.com/task/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tela.com/task/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tela.com/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.tela.com/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_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tela.com/task/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.tela.com/task/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tela.com/task/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "8b6d2c9a-1f4e-4c1b-9a1e-3c2d5e6f7a80",
"reference": 42,
"name": "Invoice-2025-001.pdf",
"status": "completed",
"rawInput": {
"application_id": "95cec438-6080-44fe-8275-28b16bd40178",
"variables": {
"document": {
"files": [
{
"file_url": "https://example.com/invoice.pdf",
"file_name": "Invoice-2025-001.pdf",
"mime_type": "application/pdf"
}
]
}
}
},
"inputContent": {
"variables": {
"document": {
"files": [
{
"file_url": "https://example.com/invoice.pdf",
"file_name": "Invoice-2025-001.pdf",
"mime_type": "application/pdf"
}
]
}
},
"messages": [],
"files": [
{
"name": "document",
"filename": "Invoice-2025-001.pdf",
"url": "https://example.com/invoice.pdf",
"usedAt": "variables",
"mimeType": "application/pdf"
}
]
},
"outputContent": {
"role": "assistant",
"content": {
"cliente": "Acme Corporation",
"valor": 150000,
"dataVencimento": "2025-03-31"
}
},
"originalOutputContent": {
"role": "assistant",
"content": {
"cliente": "Acme Corp",
"valor": 150000,
"dataVencimento": "2025-03-31"
}
},
"createdBy": "api@company.com",
"approvedBy": "reviewer@company.com",
"approvedAt": "2025-01-15T11:00:00.000Z",
"completionRunId": "b83b1558-de5b-4e45-b517-7bececbdd154",
"workflowRunId": null,
"sourceType": "prompt",
"agentId": null,
"agentRef": null,
"agentSessionId": null,
"promptVersionId": "76065caa-c519-441a-8fe2-cc43e29664ab",
"promptApplicationId": "95cec438-6080-44fe-8275-28b16bd40178",
"workspaceId": "3f55cfd9-4427-4887-a181-d9ad39967802",
"metadata": {
"editedFields": [
{
"path": "cliente",
"author": "reviewer@company.com",
"editedAt": "2025-01-15T10:58:00.000Z",
"previousValue": "Acme Corp"
}
]
},
"tags": [
"priority"
],
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T11:00:00.000Z",
"deletedAt": null,
"analytics": {
"taskId": "8b6d2c9a-1f4e-4c1b-9a1e-3c2d5e6f7a80",
"promptApplicationId": "95cec438-6080-44fe-8275-28b16bd40178",
"firstOpenedAt": "2025-01-15T10:45:00.000Z",
"firstOpenedByEmail": "reviewer@company.com",
"approvedAt": "2025-01-15T11:00:00.000Z",
"approvedByEmail": "reviewer@company.com",
"reviewDurationSeconds": 900,
"totalFields": 3,
"fieldsEdited": 1,
"accuracyPercentage": "66.67",
"lastActivityAt": "2025-01-15T11:00:00.000Z",
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T11:00:00.000Z"
}
}Authorizations
Query Parameters
Response
The task