cURL
curl --request POST \
--url https://api.unifygtm.com/tasks/v1/tasks/query-jobs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"filter": {
"updated_at": {
"gt": "<string>",
"gte": "<string>",
"lt": "<string>",
"lte": "<string>"
},
"created_at": {
"gt": "<string>",
"gte": "<string>",
"lt": "<string>",
"lte": "<string>"
},
"due_at": {
"gt": "<string>",
"gte": "<string>",
"lt": "<string>",
"lte": "<string>"
},
"ended_at": {
"gt": "<string>",
"gte": "<string>",
"lt": "<string>",
"lte": "<string>"
},
"id": {
"in": [
"<string>"
],
"not_in": [
"<string>"
]
},
"status": {
"in": [],
"not_in": []
},
"type": {
"in": [],
"not_in": []
},
"priority": {
"in": [],
"not_in": []
}
}
}
'import requests
url = "https://api.unifygtm.com/tasks/v1/tasks/query-jobs"
payload = { "filter": {
"updated_at": {
"gt": "<string>",
"gte": "<string>",
"lt": "<string>",
"lte": "<string>"
},
"created_at": {
"gt": "<string>",
"gte": "<string>",
"lt": "<string>",
"lte": "<string>"
},
"due_at": {
"gt": "<string>",
"gte": "<string>",
"lt": "<string>",
"lte": "<string>"
},
"ended_at": {
"gt": "<string>",
"gte": "<string>",
"lt": "<string>",
"lte": "<string>"
},
"id": {
"in": ["<string>"],
"not_in": ["<string>"]
},
"status": {
"in": [],
"not_in": []
},
"type": {
"in": [],
"not_in": []
},
"priority": {
"in": [],
"not_in": []
}
} }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filter: {
updated_at: {gt: '<string>', gte: '<string>', lt: '<string>', lte: '<string>'},
created_at: {gt: '<string>', gte: '<string>', lt: '<string>', lte: '<string>'},
due_at: {gt: '<string>', gte: '<string>', lt: '<string>', lte: '<string>'},
ended_at: {gt: '<string>', gte: '<string>', lt: '<string>', lte: '<string>'},
id: {in: ['<string>'], not_in: ['<string>']},
status: {in: [], not_in: []},
type: {in: [], not_in: []},
priority: {in: [], not_in: []}
}
})
};
fetch('https://api.unifygtm.com/tasks/v1/tasks/query-jobs', 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.unifygtm.com/tasks/v1/tasks/query-jobs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filter' => [
'updated_at' => [
'gt' => '<string>',
'gte' => '<string>',
'lt' => '<string>',
'lte' => '<string>'
],
'created_at' => [
'gt' => '<string>',
'gte' => '<string>',
'lt' => '<string>',
'lte' => '<string>'
],
'due_at' => [
'gt' => '<string>',
'gte' => '<string>',
'lt' => '<string>',
'lte' => '<string>'
],
'ended_at' => [
'gt' => '<string>',
'gte' => '<string>',
'lt' => '<string>',
'lte' => '<string>'
],
'id' => [
'in' => [
'<string>'
],
'not_in' => [
'<string>'
]
],
'status' => [
'in' => [
],
'not_in' => [
]
],
'type' => [
'in' => [
],
'not_in' => [
]
],
'priority' => [
'in' => [
],
'not_in' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.unifygtm.com/tasks/v1/tasks/query-jobs"
payload := strings.NewReader("{\n \"filter\": {\n \"updated_at\": {\n \"gt\": \"<string>\",\n \"gte\": \"<string>\",\n \"lt\": \"<string>\",\n \"lte\": \"<string>\"\n },\n \"created_at\": {\n \"gt\": \"<string>\",\n \"gte\": \"<string>\",\n \"lt\": \"<string>\",\n \"lte\": \"<string>\"\n },\n \"due_at\": {\n \"gt\": \"<string>\",\n \"gte\": \"<string>\",\n \"lt\": \"<string>\",\n \"lte\": \"<string>\"\n },\n \"ended_at\": {\n \"gt\": \"<string>\",\n \"gte\": \"<string>\",\n \"lt\": \"<string>\",\n \"lte\": \"<string>\"\n },\n \"id\": {\n \"in\": [\n \"<string>\"\n ],\n \"not_in\": [\n \"<string>\"\n ]\n },\n \"status\": {\n \"in\": [],\n \"not_in\": []\n },\n \"type\": {\n \"in\": [],\n \"not_in\": []\n },\n \"priority\": {\n \"in\": [],\n \"not_in\": []\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.post("https://api.unifygtm.com/tasks/v1/tasks/query-jobs")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"filter\": {\n \"updated_at\": {\n \"gt\": \"<string>\",\n \"gte\": \"<string>\",\n \"lt\": \"<string>\",\n \"lte\": \"<string>\"\n },\n \"created_at\": {\n \"gt\": \"<string>\",\n \"gte\": \"<string>\",\n \"lt\": \"<string>\",\n \"lte\": \"<string>\"\n },\n \"due_at\": {\n \"gt\": \"<string>\",\n \"gte\": \"<string>\",\n \"lt\": \"<string>\",\n \"lte\": \"<string>\"\n },\n \"ended_at\": {\n \"gt\": \"<string>\",\n \"gte\": \"<string>\",\n \"lt\": \"<string>\",\n \"lte\": \"<string>\"\n },\n \"id\": {\n \"in\": [\n \"<string>\"\n ],\n \"not_in\": [\n \"<string>\"\n ]\n },\n \"status\": {\n \"in\": [],\n \"not_in\": []\n },\n \"type\": {\n \"in\": [],\n \"not_in\": []\n },\n \"priority\": {\n \"in\": [],\n \"not_in\": []\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.unifygtm.com/tasks/v1/tasks/query-jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filter\": {\n \"updated_at\": {\n \"gt\": \"<string>\",\n \"gte\": \"<string>\",\n \"lt\": \"<string>\",\n \"lte\": \"<string>\"\n },\n \"created_at\": {\n \"gt\": \"<string>\",\n \"gte\": \"<string>\",\n \"lt\": \"<string>\",\n \"lte\": \"<string>\"\n },\n \"due_at\": {\n \"gt\": \"<string>\",\n \"gte\": \"<string>\",\n \"lt\": \"<string>\",\n \"lte\": \"<string>\"\n },\n \"ended_at\": {\n \"gt\": \"<string>\",\n \"gte\": \"<string>\",\n \"lt\": \"<string>\",\n \"lte\": \"<string>\"\n },\n \"id\": {\n \"in\": [\n \"<string>\"\n ],\n \"not_in\": [\n \"<string>\"\n ]\n },\n \"status\": {\n \"in\": [],\n \"not_in\": []\n },\n \"type\": {\n \"in\": [],\n \"not_in\": []\n },\n \"priority\": {\n \"in\": [],\n \"not_in\": []\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"status": "IN_PROGRESS",
"expires_at": "<string>"
}{
"status": "bad_request",
"errors": [
{
"code": "<string>",
"path": [
"<string>"
],
"object_api_name": "<string>",
"attribute_api_name": "<string>"
}
],
"message": "<string>"
}{
"status": "unauthorized",
"message": "<string>"
}{
"status": "rate_limited",
"message": "<string>"
}{
"status": "error",
"message": "<string>"
}Query tasks
Create job
Create a job to query tasks.
POST
/
tasks
/
v1
/
tasks
/
query-jobs
cURL
curl --request POST \
--url https://api.unifygtm.com/tasks/v1/tasks/query-jobs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"filter": {
"updated_at": {
"gt": "<string>",
"gte": "<string>",
"lt": "<string>",
"lte": "<string>"
},
"created_at": {
"gt": "<string>",
"gte": "<string>",
"lt": "<string>",
"lte": "<string>"
},
"due_at": {
"gt": "<string>",
"gte": "<string>",
"lt": "<string>",
"lte": "<string>"
},
"ended_at": {
"gt": "<string>",
"gte": "<string>",
"lt": "<string>",
"lte": "<string>"
},
"id": {
"in": [
"<string>"
],
"not_in": [
"<string>"
]
},
"status": {
"in": [],
"not_in": []
},
"type": {
"in": [],
"not_in": []
},
"priority": {
"in": [],
"not_in": []
}
}
}
'import requests
url = "https://api.unifygtm.com/tasks/v1/tasks/query-jobs"
payload = { "filter": {
"updated_at": {
"gt": "<string>",
"gte": "<string>",
"lt": "<string>",
"lte": "<string>"
},
"created_at": {
"gt": "<string>",
"gte": "<string>",
"lt": "<string>",
"lte": "<string>"
},
"due_at": {
"gt": "<string>",
"gte": "<string>",
"lt": "<string>",
"lte": "<string>"
},
"ended_at": {
"gt": "<string>",
"gte": "<string>",
"lt": "<string>",
"lte": "<string>"
},
"id": {
"in": ["<string>"],
"not_in": ["<string>"]
},
"status": {
"in": [],
"not_in": []
},
"type": {
"in": [],
"not_in": []
},
"priority": {
"in": [],
"not_in": []
}
} }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filter: {
updated_at: {gt: '<string>', gte: '<string>', lt: '<string>', lte: '<string>'},
created_at: {gt: '<string>', gte: '<string>', lt: '<string>', lte: '<string>'},
due_at: {gt: '<string>', gte: '<string>', lt: '<string>', lte: '<string>'},
ended_at: {gt: '<string>', gte: '<string>', lt: '<string>', lte: '<string>'},
id: {in: ['<string>'], not_in: ['<string>']},
status: {in: [], not_in: []},
type: {in: [], not_in: []},
priority: {in: [], not_in: []}
}
})
};
fetch('https://api.unifygtm.com/tasks/v1/tasks/query-jobs', 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.unifygtm.com/tasks/v1/tasks/query-jobs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filter' => [
'updated_at' => [
'gt' => '<string>',
'gte' => '<string>',
'lt' => '<string>',
'lte' => '<string>'
],
'created_at' => [
'gt' => '<string>',
'gte' => '<string>',
'lt' => '<string>',
'lte' => '<string>'
],
'due_at' => [
'gt' => '<string>',
'gte' => '<string>',
'lt' => '<string>',
'lte' => '<string>'
],
'ended_at' => [
'gt' => '<string>',
'gte' => '<string>',
'lt' => '<string>',
'lte' => '<string>'
],
'id' => [
'in' => [
'<string>'
],
'not_in' => [
'<string>'
]
],
'status' => [
'in' => [
],
'not_in' => [
]
],
'type' => [
'in' => [
],
'not_in' => [
]
],
'priority' => [
'in' => [
],
'not_in' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.unifygtm.com/tasks/v1/tasks/query-jobs"
payload := strings.NewReader("{\n \"filter\": {\n \"updated_at\": {\n \"gt\": \"<string>\",\n \"gte\": \"<string>\",\n \"lt\": \"<string>\",\n \"lte\": \"<string>\"\n },\n \"created_at\": {\n \"gt\": \"<string>\",\n \"gte\": \"<string>\",\n \"lt\": \"<string>\",\n \"lte\": \"<string>\"\n },\n \"due_at\": {\n \"gt\": \"<string>\",\n \"gte\": \"<string>\",\n \"lt\": \"<string>\",\n \"lte\": \"<string>\"\n },\n \"ended_at\": {\n \"gt\": \"<string>\",\n \"gte\": \"<string>\",\n \"lt\": \"<string>\",\n \"lte\": \"<string>\"\n },\n \"id\": {\n \"in\": [\n \"<string>\"\n ],\n \"not_in\": [\n \"<string>\"\n ]\n },\n \"status\": {\n \"in\": [],\n \"not_in\": []\n },\n \"type\": {\n \"in\": [],\n \"not_in\": []\n },\n \"priority\": {\n \"in\": [],\n \"not_in\": []\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.post("https://api.unifygtm.com/tasks/v1/tasks/query-jobs")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"filter\": {\n \"updated_at\": {\n \"gt\": \"<string>\",\n \"gte\": \"<string>\",\n \"lt\": \"<string>\",\n \"lte\": \"<string>\"\n },\n \"created_at\": {\n \"gt\": \"<string>\",\n \"gte\": \"<string>\",\n \"lt\": \"<string>\",\n \"lte\": \"<string>\"\n },\n \"due_at\": {\n \"gt\": \"<string>\",\n \"gte\": \"<string>\",\n \"lt\": \"<string>\",\n \"lte\": \"<string>\"\n },\n \"ended_at\": {\n \"gt\": \"<string>\",\n \"gte\": \"<string>\",\n \"lt\": \"<string>\",\n \"lte\": \"<string>\"\n },\n \"id\": {\n \"in\": [\n \"<string>\"\n ],\n \"not_in\": [\n \"<string>\"\n ]\n },\n \"status\": {\n \"in\": [],\n \"not_in\": []\n },\n \"type\": {\n \"in\": [],\n \"not_in\": []\n },\n \"priority\": {\n \"in\": [],\n \"not_in\": []\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.unifygtm.com/tasks/v1/tasks/query-jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filter\": {\n \"updated_at\": {\n \"gt\": \"<string>\",\n \"gte\": \"<string>\",\n \"lt\": \"<string>\",\n \"lte\": \"<string>\"\n },\n \"created_at\": {\n \"gt\": \"<string>\",\n \"gte\": \"<string>\",\n \"lt\": \"<string>\",\n \"lte\": \"<string>\"\n },\n \"due_at\": {\n \"gt\": \"<string>\",\n \"gte\": \"<string>\",\n \"lt\": \"<string>\",\n \"lte\": \"<string>\"\n },\n \"ended_at\": {\n \"gt\": \"<string>\",\n \"gte\": \"<string>\",\n \"lt\": \"<string>\",\n \"lte\": \"<string>\"\n },\n \"id\": {\n \"in\": [\n \"<string>\"\n ],\n \"not_in\": [\n \"<string>\"\n ]\n },\n \"status\": {\n \"in\": [],\n \"not_in\": []\n },\n \"type\": {\n \"in\": [],\n \"not_in\": []\n },\n \"priority\": {\n \"in\": [],\n \"not_in\": []\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"status": "IN_PROGRESS",
"expires_at": "<string>"
}{
"status": "bad_request",
"errors": [
{
"code": "<string>",
"path": [
"<string>"
],
"object_api_name": "<string>",
"attribute_api_name": "<string>"
}
],
"message": "<string>"
}{
"status": "unauthorized",
"message": "<string>"
}{
"status": "rate_limited",
"message": "<string>"
}{
"status": "error",
"message": "<string>"
}Overview
Export tasks asynchronously for reporting or a recurring data sync. Create a job with the filters you need, poll its status, then retrieve the finished results.Examples
Export completed calls
Export completed calls
Set The response includes
UNIFY_API_KEY to your API key. This example selects completed call tasks
that changed during September 2026:curl --request POST \
--url "https://api.unifygtm.com/tasks/v1/tasks/query-jobs" \
--header "X-Api-Key: $UNIFY_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"filter": {
"type": {
"in": [
"PHONE_CALL"
]
},
"status": {
"in": [
"COMPLETED"
]
},
"updated_at": {
"gte": "2026-09-01T00:00:00Z",
"lt": "2026-10-01T00:00:00Z"
}
}
}'
job_id, status, and expires_at. Save the job ID and
check its status until it reaches
FINISHED. Then retrieve the results.The date filter applies to when each task was last updated. Use ended_at
instead when your report needs the date the task finished.See Query jobs for retry behavior,
expiration, and rate limits.Authorizations
Body
application/json
Request body for creating a tasks query job.
Filters that select the tasks to export. Omit to export all tasks.
Show child attributes
Show child attributes
⌘I