Skip to main content
POST
/
api
/
v1
/
training
/
sources
/
{id}
/
claim
Claim a source for crawling
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({tenant_id: '01935-tttt-tttt-tttt-tttttttttttt'})
};

fetch('{protocol}://{host}/api/v1/training/sources/{id}/claim', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "type": "<string>",
  "url": "<string>",
  "host": "<string>",
  "schedule": "<string>",
  "crawl_depth": 123,
  "include_patterns": [
    "<string>"
  ],
  "exclude_patterns": [
    "<string>"
  ],
  "pages_indexed": 123,
  "pages_total": 123,
  "last_crawl_at": "2023-11-07T05:31:56Z",
  "next_crawl_at": "2023-11-07T05:31:56Z",
  "last_error": "<string>"
}

Authorizations

Authorization
string
header
required

Deploy-wide server-to-server bearer token (ENGINE_API_TOKEN), validated by the engine_api firewall. Authenticates the Engine API, Knowledge base, and Conversions surfaces. The tenant_id rides in the request body and is trusted in V1 — keep this token strictly server-side.

Path Parameters

id
string<uuid>
required

The knowledge-base source UUID.

Body

application/json
tenant_id
string<uuid>
required

Body-selected tenant the call acts for.

Response

Source claimed

A knowledge-base source's crawl configuration and current status.

id
string<uuid>
required
tenant_id
string<uuid>
required
type
string
required

Source type (e.g. website).

url
string
required
status
enum<string>
required
Available options:
scheduled,
crawling,
ready,
failed,
paused
host
string | null
schedule
string | null

Crawl schedule, when recurring.

crawl_depth
integer | null
include_patterns
string[] | null
exclude_patterns
string[] | null
pages_indexed
integer | null
pages_total
integer | null
last_crawl_at
string<date-time> | null
next_crawl_at
string<date-time> | null
last_error
string | null