http
POST https://services.leadconnectorhq.com/knowledge-bases/crawler/train

Authorization

NameTypeRequiredExampleDescription
AuthorizationstringYesBearer token generated from the Leadway portal. See Authentication.
VersionstringYes2021-07-28API version.

Body

NameTypeRequiredExampleDescription
locationIdstringYestDtDnQdgm2LXpyiqYvZ6Account ID as string
urlIdsstring[]YesList of Object ids of the discovered urls
knowledgeBaseIdstringYesjjkkxftgvbhjmn,knowledge base id
operationIdstringYes688b640bcb02d498102a13f0,operation id as string

Responses

201 - Pages trained successfully
  • success (boolean, required): Indicates if the operation was successful Example: True

json
{
  "success": true
}
400 - Bad Request
  • statusCode (number): Example: 400

  • message (string): Example: Bad Request

json
{
  "statusCode": 400,
  "message": "Bad Request"
}
401 - Unauthorized
  • statusCode (number): Example: 401

  • message (string): Example: Invalid token: access token is invalid

  • error (string): Example: Unauthorized

json
{
  "statusCode": 401,
  "message": "Invalid token: access token is invalid",
  "error": "Unauthorized"
}
422 - Unprocessable Entity
  • statusCode (number): Example: 422

  • message (string[])

  • error (string): Example: Unprocessable Entity

json
{
  "statusCode": 422,
  "message": [
    "Unprocessable Entity"
  ],
  "error": "Unprocessable Entity"
}
500 - Internal Server Error
  • statusCode (number): Example: 500

  • message (string): Example: Internal Server Error

json
{
  "statusCode": 500,
  "message": "Internal Server Error"
}

Example

curl -X POST 'https://services.leadconnectorhq.com/knowledge-bases/crawler/train' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -d '{
  "locationId": "tDtDnQdgm2LXpyiqYvZ6",
  "urlIds": [
    "688b640bcb02d498102a13ec",
    "688b640bcb02d498102a13ea"
  ],
  "knowledgeBaseId": "jjkkxftgvbhjmn,",
  "operationId": "688b640bcb02d498102a13f0,"
}'

Last updated October 26, 2026

Was this page helpful?