curl --request POST \
--url https://gateway.firsttouch.ai/api/public/tools/approve_tasks \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"taskIds": null,
"allTasks": false,
"limit": null,
"types": null,
"searchQuery": null,
"assignedUserId": null,
"includeTeamTasks": false,
"flowIds": null,
"ignoreTaskIds": null,
"fromUtc": null,
"toUtc": null,
"email": null,
"firstName": null,
"lastName": null,
"companyDomain": null,
"includeSuccessfulItems": false
}
'import requests
url = "https://gateway.firsttouch.ai/api/public/tools/approve_tasks"
payload = {
"taskIds": None,
"allTasks": False,
"limit": None,
"types": None,
"searchQuery": None,
"assignedUserId": None,
"includeTeamTasks": False,
"flowIds": None,
"ignoreTaskIds": None,
"fromUtc": None,
"toUtc": None,
"email": None,
"firstName": None,
"lastName": None,
"companyDomain": None,
"includeSuccessfulItems": False
}
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({
taskIds: null,
allTasks: false,
limit: null,
types: null,
searchQuery: null,
assignedUserId: null,
includeTeamTasks: false,
flowIds: null,
ignoreTaskIds: null,
fromUtc: null,
toUtc: null,
email: null,
firstName: null,
lastName: null,
companyDomain: null,
includeSuccessfulItems: false
})
};
fetch('https://gateway.firsttouch.ai/api/public/tools/approve_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://gateway.firsttouch.ai/api/public/tools/approve_tasks",
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([
'taskIds' => null,
'allTasks' => false,
'limit' => null,
'types' => null,
'searchQuery' => null,
'assignedUserId' => null,
'includeTeamTasks' => false,
'flowIds' => null,
'ignoreTaskIds' => null,
'fromUtc' => null,
'toUtc' => null,
'email' => null,
'firstName' => null,
'lastName' => null,
'companyDomain' => null,
'includeSuccessfulItems' => false
]),
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://gateway.firsttouch.ai/api/public/tools/approve_tasks"
payload := strings.NewReader("{\n \"taskIds\": null,\n \"allTasks\": false,\n \"limit\": null,\n \"types\": null,\n \"searchQuery\": null,\n \"assignedUserId\": null,\n \"includeTeamTasks\": false,\n \"flowIds\": null,\n \"ignoreTaskIds\": null,\n \"fromUtc\": null,\n \"toUtc\": null,\n \"email\": null,\n \"firstName\": null,\n \"lastName\": null,\n \"companyDomain\": null,\n \"includeSuccessfulItems\": false\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://gateway.firsttouch.ai/api/public/tools/approve_tasks")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"taskIds\": null,\n \"allTasks\": false,\n \"limit\": null,\n \"types\": null,\n \"searchQuery\": null,\n \"assignedUserId\": null,\n \"includeTeamTasks\": false,\n \"flowIds\": null,\n \"ignoreTaskIds\": null,\n \"fromUtc\": null,\n \"toUtc\": null,\n \"email\": null,\n \"firstName\": null,\n \"lastName\": null,\n \"companyDomain\": null,\n \"includeSuccessfulItems\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.firsttouch.ai/api/public/tools/approve_tasks")
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 \"taskIds\": null,\n \"allTasks\": false,\n \"limit\": null,\n \"types\": null,\n \"searchQuery\": null,\n \"assignedUserId\": null,\n \"includeTeamTasks\": false,\n \"flowIds\": null,\n \"ignoreTaskIds\": null,\n \"fromUtc\": null,\n \"toUtc\": null,\n \"email\": null,\n \"firstName\": null,\n \"lastName\": null,\n \"companyDomain\": null,\n \"includeSuccessfulItems\": false\n}"
response = http.request(request)
puts response.read_body{
"error": "<string>",
"message": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"traceId": "<string>"
}Approve Tasks
Approve selected tasks or all matching todo tasks using the UI bulk completion behavior, up to 1000 per call.
Detailed usage guidance
- Use
allTasks=truedirectly for all matching tasks; usetaskIdsfor a specific selected set. - Approves every grouped action in section_approval tasks, logs call tasks, and marks manual tasks done.
- No taskHash or action decisions are required; the current task content is approved at execution time.
- Access and readiness checks still apply.
- Returns an outcome for every selected task; failures do not undo successful tasks.
- In allTasks mode, defaults to the current user’s tasks, selects newest first, and hasMore indicates additional matching tasks were not selected.
- Repeat for remaining todo tasks, using ignoreTaskIds to exclude failures if needed.
curl --request POST \
--url https://gateway.firsttouch.ai/api/public/tools/approve_tasks \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"taskIds": null,
"allTasks": false,
"limit": null,
"types": null,
"searchQuery": null,
"assignedUserId": null,
"includeTeamTasks": false,
"flowIds": null,
"ignoreTaskIds": null,
"fromUtc": null,
"toUtc": null,
"email": null,
"firstName": null,
"lastName": null,
"companyDomain": null,
"includeSuccessfulItems": false
}
'import requests
url = "https://gateway.firsttouch.ai/api/public/tools/approve_tasks"
payload = {
"taskIds": None,
"allTasks": False,
"limit": None,
"types": None,
"searchQuery": None,
"assignedUserId": None,
"includeTeamTasks": False,
"flowIds": None,
"ignoreTaskIds": None,
"fromUtc": None,
"toUtc": None,
"email": None,
"firstName": None,
"lastName": None,
"companyDomain": None,
"includeSuccessfulItems": False
}
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({
taskIds: null,
allTasks: false,
limit: null,
types: null,
searchQuery: null,
assignedUserId: null,
includeTeamTasks: false,
flowIds: null,
ignoreTaskIds: null,
fromUtc: null,
toUtc: null,
email: null,
firstName: null,
lastName: null,
companyDomain: null,
includeSuccessfulItems: false
})
};
fetch('https://gateway.firsttouch.ai/api/public/tools/approve_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://gateway.firsttouch.ai/api/public/tools/approve_tasks",
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([
'taskIds' => null,
'allTasks' => false,
'limit' => null,
'types' => null,
'searchQuery' => null,
'assignedUserId' => null,
'includeTeamTasks' => false,
'flowIds' => null,
'ignoreTaskIds' => null,
'fromUtc' => null,
'toUtc' => null,
'email' => null,
'firstName' => null,
'lastName' => null,
'companyDomain' => null,
'includeSuccessfulItems' => false
]),
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://gateway.firsttouch.ai/api/public/tools/approve_tasks"
payload := strings.NewReader("{\n \"taskIds\": null,\n \"allTasks\": false,\n \"limit\": null,\n \"types\": null,\n \"searchQuery\": null,\n \"assignedUserId\": null,\n \"includeTeamTasks\": false,\n \"flowIds\": null,\n \"ignoreTaskIds\": null,\n \"fromUtc\": null,\n \"toUtc\": null,\n \"email\": null,\n \"firstName\": null,\n \"lastName\": null,\n \"companyDomain\": null,\n \"includeSuccessfulItems\": false\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://gateway.firsttouch.ai/api/public/tools/approve_tasks")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"taskIds\": null,\n \"allTasks\": false,\n \"limit\": null,\n \"types\": null,\n \"searchQuery\": null,\n \"assignedUserId\": null,\n \"includeTeamTasks\": false,\n \"flowIds\": null,\n \"ignoreTaskIds\": null,\n \"fromUtc\": null,\n \"toUtc\": null,\n \"email\": null,\n \"firstName\": null,\n \"lastName\": null,\n \"companyDomain\": null,\n \"includeSuccessfulItems\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.firsttouch.ai/api/public/tools/approve_tasks")
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 \"taskIds\": null,\n \"allTasks\": false,\n \"limit\": null,\n \"types\": null,\n \"searchQuery\": null,\n \"assignedUserId\": null,\n \"includeTeamTasks\": false,\n \"flowIds\": null,\n \"ignoreTaskIds\": null,\n \"fromUtc\": null,\n \"toUtc\": null,\n \"email\": null,\n \"firstName\": null,\n \"lastName\": null,\n \"companyDomain\": null,\n \"includeSuccessfulItems\": false\n}"
response = http.request(request)
puts response.read_body{
"error": "<string>",
"message": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"traceId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"traceId": "<string>"
}Authorizations
Body
Selected task ids, 1 to 1000 unique nonblank values. Omit when allTasks=true. Other filters apply only to allTasks mode.
Approve all matching todo tasks, up to limit per call. Must be explicitly true when taskIds are omitted.
Maximum tasks in allTasks mode. Defaults to 1000; must be between 1 and 1000. Omit with taskIds.
AllTasks mode: exact task kinds to include: call, manual, section_approval. Omit for all kinds.
call, manual, section_approval AllTasks mode: search prospect first name, last name, company name, and company domain.
AllTasks mode: optional exact assigned user id. Defaults to the current user.
AllTasks mode: include tasks owned by active members of the current team. Mutation permissions still apply.
AllTasks mode: exact enrollment ids to filter tasks; do not pass flowPlanId.
AllTasks mode: task ids to exclude, for example previously failed tasks.
AllTasks mode: created-from timestamp in UTC.
AllTasks mode: created-to timestamp in UTC.
AllTasks mode: prospect email filter.
AllTasks mode: prospect first name filter.
AllTasks mode: prospect last name filter.
AllTasks mode: company domain filter.
Include successful tasks in items. Defaults to false; all failures and outcome counts are always returned.
Response
Tool result.