Skip to main content
Web CrawlerVersion: v3

Train discovered website pages and ingest into the knowledge base

POST/knowledge-bases/crawler/train

Queues selected discovered pages so the AI ingests their content into the knowledge base. WHEN TO USE: use this when discoverWebsite has already found pages; use discoverWebsite to crawl first; use deleteTrainedUrlsForKnowledgeBase to untrain pages. RETURNS: whether training was queued, a status message, and the URL ids that were accepted.

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your access token.

Scope:knowledge-bases.write
Auth methods:OAuthPrivate Integration
Token type:Sub-Account Token

Request​

Headers

Versionstringrequired

API Version

Available optionsv3
Example:v3

Body

locationIdstringrequired

Location ID as string

Example:jNtgzTfHnLKErAWswvVE
knowledgeBaseIdstringrequired

Knowledge base ID as string

Example:RXzAdYGknD2phAoln3Jl
operationIdstringrequired

Operation ID as string

Example:689267ba9d8d63ea160ee9c7
urlIdsstring[]required

List of URL IDs to train

Example:["689267ccb27254d92da17b69"]

Response

Pages trained successfully

successbooleanrequired

Indicates if the operation was successful

Example:true
messagestringrequired

Success message

Example:Training queued for 3 URLs
urlIdsstring[]required

Array of URL IDs that were queued for training

Example:["url_123","url_456","url_789"]