Suggest audiences from a campaign
curl --request POST \
--url https://api.instantly.ai/api/v2/ai-agents/lead-finder/suggest-audience \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"campaign_id": "01a034fe-a677-7df9-92e6-360db297285c"
}
'import requests
url = "https://api.instantly.ai/api/v2/ai-agents/lead-finder/suggest-audience"
payload = { "campaign_id": "01a034fe-a677-7df9-92e6-360db297285c" }
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({campaign_id: '01a034fe-a677-7df9-92e6-360db297285c'})
};
fetch('https://api.instantly.ai/api/v2/ai-agents/lead-finder/suggest-audience', 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/suggest-audience")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"campaign_id\": \"01a034fe-a677-7df9-92e6-360db297285c\"\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.instantly.ai/api/v2/ai-agents/lead-finder/suggest-audience",
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([
'campaign_id' => '01a034fe-a677-7df9-92e6-360db297285c'
]),
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/suggest-audience"
payload := strings.NewReader("{\n \"campaign_id\": \"01a034fe-a677-7df9-92e6-360db297285c\"\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))
}{
"campaign_id": "0198c2a4-3f1e-7000-8000-000000000000",
"analyzed_lead_count": 4820,
"total_lead_count": 4820,
"confidence": "high",
"profile_summary": "Mostly VP/Director-level Sales leaders at US B2B software companies.",
"suggestions": [
{
"label": "Same profile",
"query": "VP of Sales at US software companies, 50-200 employees",
"rationale": "Matches the dominant title, industry, size and geo in this campaign.",
"filters": {}
}
]
}{
"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": 422,
"error": "Unprocessable Entity",
"message": "The request cannot be processed"
}{
"statusCode": 429,
"error": "Too Many Requests",
"message": "Rate limit exceeded"
}{
"statusCode": 502,
"error": "Bad Gateway",
"message": "Failed to generate audience suggestions."
}AI Lead Finder Agent
Suggest audiences from a campaign
Analyze the leads already in a campaign and suggest SuperSearch audiences that match them. Each suggestion returns a natural-language query plus store-format filters. Rate limited per workspace.
Requires one of the following scopes: ai_agents:read, ai_agents:all, all:read, all:all
POST
/
api
/
v2
/
ai-agents
/
lead-finder
/
suggest-audience
Suggest audiences from a campaign
curl --request POST \
--url https://api.instantly.ai/api/v2/ai-agents/lead-finder/suggest-audience \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"campaign_id": "01a034fe-a677-7df9-92e6-360db297285c"
}
'import requests
url = "https://api.instantly.ai/api/v2/ai-agents/lead-finder/suggest-audience"
payload = { "campaign_id": "01a034fe-a677-7df9-92e6-360db297285c" }
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({campaign_id: '01a034fe-a677-7df9-92e6-360db297285c'})
};
fetch('https://api.instantly.ai/api/v2/ai-agents/lead-finder/suggest-audience', 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/suggest-audience")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"campaign_id\": \"01a034fe-a677-7df9-92e6-360db297285c\"\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.instantly.ai/api/v2/ai-agents/lead-finder/suggest-audience",
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([
'campaign_id' => '01a034fe-a677-7df9-92e6-360db297285c'
]),
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/suggest-audience"
payload := strings.NewReader("{\n \"campaign_id\": \"01a034fe-a677-7df9-92e6-360db297285c\"\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))
}{
"campaign_id": "0198c2a4-3f1e-7000-8000-000000000000",
"analyzed_lead_count": 4820,
"total_lead_count": 4820,
"confidence": "high",
"profile_summary": "Mostly VP/Director-level Sales leaders at US B2B software companies.",
"suggestions": [
{
"label": "Same profile",
"query": "VP of Sales at US software companies, 50-200 employees",
"rationale": "Matches the dominant title, industry, size and geo in this campaign.",
"filters": {}
}
]
}{
"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": 422,
"error": "Unprocessable Entity",
"message": "The request cannot be processed"
}{
"statusCode": 429,
"error": "Too Many Requests",
"message": "Rate limit exceeded"
}{
"statusCode": 502,
"error": "Bad Gateway",
"message": "Failed to generate audience suggestions."
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Audience suggestions derived from the campaign
Example:
"0198c2a4-3f1e-7000-8000-000000000000"
Example:
4820
Example:
4820
Available options:
high, low Example:
"high"
Example:
"Mostly VP/Director-level Sales leaders at US B2B software companies."
Show child attributes
Show child attributes
⌘I