Train Discovered URLs
Trains the knowledge base on the specified URLs. The system will crawl each URL, extract content, and index it for AI retrieval.
POST
/
knowledge-base
/
{knowledgeBaseId}
/
train-urls
Train Discovered URLs
curl --request POST \
--url https://services.leadconnectorhq.com/knowledge-base/{knowledgeBaseId}/train-urls \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"urls": [
"https://www.example.com/about",
"https://www.example.com/faq"
]
}
'const options = {
method: 'POST',
headers: {
Version: '<version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({urls: ['https://www.example.com/about', 'https://www.example.com/faq']})
};
fetch('https://services.leadconnectorhq.com/knowledge-base/{knowledgeBaseId}/train-urls', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/knowledge-base/{knowledgeBaseId}/train-urls"
payload = { "urls": ["https://www.example.com/about", "https://www.example.com/faq"] }
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "Training initiated for 2 URLs",
"jobId": "job_xyz789"
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}{
"statusCode": 404,
"message": "Not found",
"error": "Not Found"
}{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}Authorizations
Path Parameters
Body
application/json
Last modified on March 7, 2026
Was this page helpful?
Train Discovered URLs
curl --request POST \
--url https://services.leadconnectorhq.com/knowledge-base/{knowledgeBaseId}/train-urls \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"urls": [
"https://www.example.com/about",
"https://www.example.com/faq"
]
}
'const options = {
method: 'POST',
headers: {
Version: '<version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({urls: ['https://www.example.com/about', 'https://www.example.com/faq']})
};
fetch('https://services.leadconnectorhq.com/knowledge-base/{knowledgeBaseId}/train-urls', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/knowledge-base/{knowledgeBaseId}/train-urls"
payload = { "urls": ["https://www.example.com/about", "https://www.example.com/faq"] }
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "Training initiated for 2 URLs",
"jobId": "job_xyz789"
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}{
"statusCode": 404,
"message": "Not found",
"error": "Not Found"
}{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}