Tasks
List Tasks
Returns all tasks and appointments attached to the given lead. Caller must have manage permission on the lead.
GET
/
v2.0
/
tasks
List Tasks
curl --request GET \
--url https://api.lofty.com/v2.0/tasks \
--header 'Authorization: <authorization>'import requests
url = "https://api.lofty.com/v2.0/tasks"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.lofty.com/v2.0/tasks', 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.lofty.com/v2.0/tasks",
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: <authorization>"
],
]);
$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.lofty.com/v2.0/tasks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.lofty.com/v2.0/tasks")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v2.0/tasks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"tasks": [
{
"id": 123,
"leadId": 123,
"creatorId": 123,
"content": "<string>",
"type": "<string>",
"startAt": "<string>",
"endAt": "<string>",
"timeZoneCode": "America/Los_Angeles",
"allDay": false,
"finishFlag": true,
"overdueFlag": true,
"finishTime": "<string>",
"createTime": "<string>",
"lastUpdate": "<string>",
"leadName": "<string>",
"leadEmail": "<string>",
"leadPhone": "<string>",
"leadFirstName": "<string>",
"leadLastName": "<string>",
"reminderType": 123,
"assignedRole": "<string>",
"assignedUser": "<string>",
"teamId": 123,
"subject": "<string>",
"body": "<string>",
"assignedUserId": 123,
"pipelineId": 123,
"queryInfo": "<string>",
"leadUserId": 123,
"queryId": 123,
"address": "123 Main St, Los Angeles, CA"
}
]
}"<string>""<string>""<string>""<string>"Headers
Bearer [access_token]
Query Parameters
ID of the lead whose tasks and appointments to return.
Required range:
x >= 1Response
Tasks and appointments for the lead.
Wrapped response for GET /v2.0/tasks and GET /v2.0/tasks/my-tasks. Task entries are returned under the 'tasks' key.
Tasks and / or appointments matching the query.
Show child attributes
Show child attributes
⌘I
List Tasks
curl --request GET \
--url https://api.lofty.com/v2.0/tasks \
--header 'Authorization: <authorization>'import requests
url = "https://api.lofty.com/v2.0/tasks"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.lofty.com/v2.0/tasks', 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.lofty.com/v2.0/tasks",
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: <authorization>"
],
]);
$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.lofty.com/v2.0/tasks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.lofty.com/v2.0/tasks")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v2.0/tasks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"tasks": [
{
"id": 123,
"leadId": 123,
"creatorId": 123,
"content": "<string>",
"type": "<string>",
"startAt": "<string>",
"endAt": "<string>",
"timeZoneCode": "America/Los_Angeles",
"allDay": false,
"finishFlag": true,
"overdueFlag": true,
"finishTime": "<string>",
"createTime": "<string>",
"lastUpdate": "<string>",
"leadName": "<string>",
"leadEmail": "<string>",
"leadPhone": "<string>",
"leadFirstName": "<string>",
"leadLastName": "<string>",
"reminderType": 123,
"assignedRole": "<string>",
"assignedUser": "<string>",
"teamId": 123,
"subject": "<string>",
"body": "<string>",
"assignedUserId": 123,
"pipelineId": 123,
"queryInfo": "<string>",
"leadUserId": 123,
"queryId": 123,
"address": "123 Main St, Los Angeles, CA"
}
]
}"<string>""<string>""<string>""<string>"