Process Discovered URLs
curl --request POST \
--url https://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/process \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '{
"exclude": []
}'import requests
url = "https://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/process"
payload = { "exclude": [] }
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({exclude: []})
};
fetch('https://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/process', 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://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/process",
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([
'exclude' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <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://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/process"
payload := strings.NewReader("{\n \"exclude\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<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://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/process")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"exclude\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/process")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"exclude\": []\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Batch processing initiated successfully",
"data": {
"batchId": "batch-1701789123456",
"urlsProcessed": 2,
"totalUrls": 2,
"webhookUrl": "https://webhook.site/b4994000-62d9-4e17-928f-790282cb5815",
"status": "processing"
}
}Knowledge Base
Process Discovered URLs
Marks discovered URLs for exclusion and initiates batch crawling of the remaining URLs. Use this endpoint to selectively process pages discovered during a website crawl.
POST
/
ai-agents
/
agent-builder
/
knowledge-base
/
website
/
{parentUniqueId}
/
discovered-urls
/
process
Process Discovered URLs
curl --request POST \
--url https://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/process \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '{
"exclude": []
}'import requests
url = "https://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/process"
payload = { "exclude": [] }
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({exclude: []})
};
fetch('https://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/process', 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://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/process",
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([
'exclude' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <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://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/process"
payload := strings.NewReader("{\n \"exclude\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<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://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/process")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"exclude\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/knowledge-base/website/{parentUniqueId}/discovered-urls/process")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"exclude\": []\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Batch processing initiated successfully",
"data": {
"batchId": "batch-1701789123456",
"urlsProcessed": 2,
"totalUrls": 2,
"webhookUrl": "https://webhook.site/b4994000-62d9-4e17-928f-790282cb5815",
"status": "processing"
}
}For the complete error reference, see Error Guide.
Authorizations
API Key (i.e. Rest API Key from the Dashboard).
Path Parameters
Body
application/json
Discovered URLs processing configuration. App ID is taken from header, not body.
Array of unique IDs to exclude from crawling
Was this page helpful?
⌘I