curl --request POST \
--url https://api.instantly.ai/api/v2/ai-agents/lead-finder \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Lead Finder - Outbound US",
"campaign_id": "01a08b36-b257-7e7f-af78-5b78491b8e7a",
"search_filters": {
"title": {
"include": [
"VP of Sales"
]
},
"level": [
"Vice President (VP)"
],
"industry": {
"include": [
"Financial Services"
]
},
"employeeCount": [
"25 - 100"
],
"locations": [
{
"country": "United States"
}
]
},
"min_active_leads": 50,
"on_exhaustion": "broaden"
}
'import requests
url = "https://api.instantly.ai/api/v2/ai-agents/lead-finder"
payload = {
"name": "Lead Finder - Outbound US",
"campaign_id": "01a08b36-b257-7e7f-af78-5b78491b8e7a",
"search_filters": {
"title": { "include": ["VP of Sales"] },
"level": ["Vice President (VP)"],
"industry": { "include": ["Financial Services"] },
"employeeCount": ["25 - 100"],
"locations": [{ "country": "United States" }]
},
"min_active_leads": 50,
"on_exhaustion": "broaden"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Lead Finder - Outbound US',
campaign_id: '01a08b36-b257-7e7f-af78-5b78491b8e7a',
search_filters: {
title: {include: ['VP of Sales']},
level: ['Vice President (VP)'],
industry: {include: ['Financial Services']},
employeeCount: ['25 - 100'],
locations: [{country: 'United States'}]
},
min_active_leads: 50,
on_exhaustion: 'broaden'
})
};
fetch('https://api.instantly.ai/api/v2/ai-agents/lead-finder', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.instantly.ai/api/v2/ai-agents/lead-finder")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Lead Finder - Outbound US\",\n \"campaign_id\": \"01a08b36-b257-7e7f-af78-5b78491b8e7a\",\n \"search_filters\": {\n \"title\": {\n \"include\": [\n \"VP of Sales\"\n ]\n },\n \"level\": [\n \"Vice President (VP)\"\n ],\n \"industry\": {\n \"include\": [\n \"Financial Services\"\n ]\n },\n \"employeeCount\": [\n \"25 - 100\"\n ],\n \"locations\": [\n {\n \"country\": \"United States\"\n }\n ]\n },\n \"min_active_leads\": 50,\n \"on_exhaustion\": \"broaden\"\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.instantly.ai/api/v2/ai-agents/lead-finder",
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([
'name' => 'Lead Finder - Outbound US',
'campaign_id' => '01a08b36-b257-7e7f-af78-5b78491b8e7a',
'search_filters' => [
'title' => [
'include' => [
'VP of Sales'
]
],
'level' => [
'Vice President (VP)'
],
'industry' => [
'include' => [
'Financial Services'
]
],
'employeeCount' => [
'25 - 100'
],
'locations' => [
[
'country' => 'United States'
]
]
],
'min_active_leads' => 50,
'on_exhaustion' => 'broaden'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.instantly.ai/api/v2/ai-agents/lead-finder"
payload := strings.NewReader("{\n \"name\": \"Lead Finder - Outbound US\",\n \"campaign_id\": \"01a08b36-b257-7e7f-af78-5b78491b8e7a\",\n \"search_filters\": {\n \"title\": {\n \"include\": [\n \"VP of Sales\"\n ]\n },\n \"level\": [\n \"Vice President (VP)\"\n ],\n \"industry\": {\n \"include\": [\n \"Financial Services\"\n ]\n },\n \"employeeCount\": [\n \"25 - 100\"\n ],\n \"locations\": [\n {\n \"country\": \"United States\"\n }\n ]\n },\n \"min_active_leads\": 50,\n \"on_exhaustion\": \"broaden\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}{
"id": "01a08b36-69b1-7dc6-96ad-2a5bba24fa7c",
"organization_id": "01a08b36-69b1-7dc6-96ad-2a5cead35db0",
"name": "Test AI Agent",
"timestamp_created": "2026-09-10T12:06:34.161Z",
"timestamp_updated": "2026-09-10T12:06:34.161Z",
"status": 1,
"payload": {
"campaign_id": "01a08b36-69b1-7dc6-96ad-2a595c543a87",
"campaign_name": "Outbound US",
"search_filters": {},
"min_active_leads": 50,
"on_exhaustion": "pause",
"fallback_search_filters": {},
"ai_enrichment": {},
"ai_enrichment_workflow": "custom:0198c2a4-3f1e-7000-8000-000000000000"
},
"type": 6,
"is_auto_created": false,
"created_by": "01a08b36-69b1-7dc6-96ad-2a5d7d740c5a",
"description": "Optional agent description"
}{
"statusCode": 400,
"error": "Bad Request",
"message": "body must have required property 'name'"
}{
"statusCode": 401,
"error": "Unauthorized",
"message": "Missing Authorization header"
}{
"statusCode": 402,
"error": "Payment Required",
"message": "Workspace does not have an active paid plan"
}{
"statusCode": 404,
"error": "Not Found",
"message": "Resource not found"
}{
"statusCode": 409,
"error": "Conflict",
"message": "This campaign already has an active Lead Finder Agent."
}{
"statusCode": 429,
"error": "Too Many Requests",
"message": "Rate limit exceeded"
}Create an AI Lead Finder Agent
Create an AI Lead Finder Agent that keeps a campaign topped up with fresh leads. The agent immediately runs its first check after creation.
Requires one of the following scopes: ai_agents:create, ai_agents:all, all:create, all:all
curl --request POST \
--url https://api.instantly.ai/api/v2/ai-agents/lead-finder \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Lead Finder - Outbound US",
"campaign_id": "01a08b36-b257-7e7f-af78-5b78491b8e7a",
"search_filters": {
"title": {
"include": [
"VP of Sales"
]
},
"level": [
"Vice President (VP)"
],
"industry": {
"include": [
"Financial Services"
]
},
"employeeCount": [
"25 - 100"
],
"locations": [
{
"country": "United States"
}
]
},
"min_active_leads": 50,
"on_exhaustion": "broaden"
}
'import requests
url = "https://api.instantly.ai/api/v2/ai-agents/lead-finder"
payload = {
"name": "Lead Finder - Outbound US",
"campaign_id": "01a08b36-b257-7e7f-af78-5b78491b8e7a",
"search_filters": {
"title": { "include": ["VP of Sales"] },
"level": ["Vice President (VP)"],
"industry": { "include": ["Financial Services"] },
"employeeCount": ["25 - 100"],
"locations": [{ "country": "United States" }]
},
"min_active_leads": 50,
"on_exhaustion": "broaden"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Lead Finder - Outbound US',
campaign_id: '01a08b36-b257-7e7f-af78-5b78491b8e7a',
search_filters: {
title: {include: ['VP of Sales']},
level: ['Vice President (VP)'],
industry: {include: ['Financial Services']},
employeeCount: ['25 - 100'],
locations: [{country: 'United States'}]
},
min_active_leads: 50,
on_exhaustion: 'broaden'
})
};
fetch('https://api.instantly.ai/api/v2/ai-agents/lead-finder', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.instantly.ai/api/v2/ai-agents/lead-finder")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Lead Finder - Outbound US\",\n \"campaign_id\": \"01a08b36-b257-7e7f-af78-5b78491b8e7a\",\n \"search_filters\": {\n \"title\": {\n \"include\": [\n \"VP of Sales\"\n ]\n },\n \"level\": [\n \"Vice President (VP)\"\n ],\n \"industry\": {\n \"include\": [\n \"Financial Services\"\n ]\n },\n \"employeeCount\": [\n \"25 - 100\"\n ],\n \"locations\": [\n {\n \"country\": \"United States\"\n }\n ]\n },\n \"min_active_leads\": 50,\n \"on_exhaustion\": \"broaden\"\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.instantly.ai/api/v2/ai-agents/lead-finder",
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([
'name' => 'Lead Finder - Outbound US',
'campaign_id' => '01a08b36-b257-7e7f-af78-5b78491b8e7a',
'search_filters' => [
'title' => [
'include' => [
'VP of Sales'
]
],
'level' => [
'Vice President (VP)'
],
'industry' => [
'include' => [
'Financial Services'
]
],
'employeeCount' => [
'25 - 100'
],
'locations' => [
[
'country' => 'United States'
]
]
],
'min_active_leads' => 50,
'on_exhaustion' => 'broaden'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.instantly.ai/api/v2/ai-agents/lead-finder"
payload := strings.NewReader("{\n \"name\": \"Lead Finder - Outbound US\",\n \"campaign_id\": \"01a08b36-b257-7e7f-af78-5b78491b8e7a\",\n \"search_filters\": {\n \"title\": {\n \"include\": [\n \"VP of Sales\"\n ]\n },\n \"level\": [\n \"Vice President (VP)\"\n ],\n \"industry\": {\n \"include\": [\n \"Financial Services\"\n ]\n },\n \"employeeCount\": [\n \"25 - 100\"\n ],\n \"locations\": [\n {\n \"country\": \"United States\"\n }\n ]\n },\n \"min_active_leads\": 50,\n \"on_exhaustion\": \"broaden\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}{
"id": "01a08b36-69b1-7dc6-96ad-2a5bba24fa7c",
"organization_id": "01a08b36-69b1-7dc6-96ad-2a5cead35db0",
"name": "Test AI Agent",
"timestamp_created": "2026-09-10T12:06:34.161Z",
"timestamp_updated": "2026-09-10T12:06:34.161Z",
"status": 1,
"payload": {
"campaign_id": "01a08b36-69b1-7dc6-96ad-2a595c543a87",
"campaign_name": "Outbound US",
"search_filters": {},
"min_active_leads": 50,
"on_exhaustion": "pause",
"fallback_search_filters": {},
"ai_enrichment": {},
"ai_enrichment_workflow": "custom:0198c2a4-3f1e-7000-8000-000000000000"
},
"type": 6,
"is_auto_created": false,
"created_by": "01a08b36-69b1-7dc6-96ad-2a5d7d740c5a",
"description": "Optional agent description"
}{
"statusCode": 400,
"error": "Bad Request",
"message": "body must have required property 'name'"
}{
"statusCode": 401,
"error": "Unauthorized",
"message": "Missing Authorization header"
}{
"statusCode": 402,
"error": "Payment Required",
"message": "Workspace does not have an active paid plan"
}{
"statusCode": 404,
"error": "Not Found",
"message": "Resource not found"
}{
"statusCode": 409,
"error": "Conflict",
"message": "This campaign already has an active Lead Finder Agent."
}{
"statusCode": 429,
"error": "Too Many Requests",
"message": "Rate limit exceeded"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Name of the agent
1 - 255"Lead Finder - Outbound US"
Campaign the agent keeps topped up. A campaign can have at most one active agent.
"01a08b36-b257-7e7f-af78-5b78491b8e7a"
Audience search filters in the SuperSearch format. Unknown keys are rejected: the search would otherwise silently ignore them and return unfiltered results. Enum values are matched literally, including spacing.
Show child attributes
Show child attributes
{
"title": { "include": ["VP of Sales"] },
"level": ["Vice President (VP)"],
"industry": { "include": ["Financial Services"] },
"employeeCount": ["25 - 100"],
"locations": [{ "country": "United States" }]
}
Threshold below which the agent tops up the campaign
10 <= x <= 1000050
What the agent does when the search runs out of new leads
pause, fallback, broaden "broaden"
Broadened audience used when the primary search is exhausted. Required when on_exhaustion is fallback.
Show child attributes
Show child attributes
{
"title": { "include": ["VP of Sales"] },
"level": ["Vice President (VP)"],
"industry": { "include": ["Financial Services"] },
"employeeCount": ["25 - 100"],
"locations": [{ "country": "United States" }]
}
Deliver at most one lead per company in each top-up. Defaults to true.
true
Entry point the agent was created from, for adoption attribution.
agents_page, campaign_banner, supersearch, announcement, campaign_setup "campaign_banner"
AI enrichment columns filled on every top-up, keyed by output column name. Leads are held back until they are filled.
Show child attributes
Show child attributes
Workflow template the enrichment chain was loaded from — a built-in key or custom:<id>. Display-only.
"custom:0198c2a4-3f1e-7000-8000-000000000000"
Response
The created AI Lead Finder Agent
An AI Lead Finder Agent
Unique identifier for the AI agent
"01a08b36-69b1-7dc6-96ad-2a5bba24fa7c"
Organization ID
"01a08b36-69b1-7dc6-96ad-2a5cead35db0"
Name of the AI Agent
"Test AI Agent"
Timestamp when the AI agent was created
"2026-09-10T12:06:34.161Z"
Timestamp when the AI agent was updated
"2026-09-10T12:06:34.161Z"
Status of the AI Agent
-1, 0, 1 1
Lead Finder Agent payload
Show child attributes
Show child attributes
Type of the AI Agent
6 6
Whether the AI agent was auto-created
false
User ID who created the AI agent
"01a08b36-69b1-7dc6-96ad-2a5d7d740c5a"
Description of the AI agent
"Optional agent description"