Skip to main content
POST
/
knowledge
/
add-url
curl -X POST https://api.thinnest.ai/knowledge/add-url \
  -H "Authorization: Bearer $THINNESTAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "agent_id": "ag_c47e7c97_b2f2",
  "url": "https://docs.example.com/getting-started",
  "scrape_subpages": false
}'
{
  "id": 2,
  "name": "https://docs.example.com/getting-started",
  "type": "url",
  "status": "processing",
  "created_at": "2026-03-07T14:00:00Z"
}
curl -X POST https://api.thinnest.ai/knowledge/add-url \
  -H "Authorization: Bearer $THINNESTAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "agent_id": "ag_c47e7c97_b2f2",
  "url": "https://docs.example.com/getting-started",
  "scrape_subpages": false
}'

Request Body

agent_id
string
required
The agent’s public ID (ag_*)
url
string
required
Web page URL to scrape and index
scrape_subpages
boolean
default:"false"
Crawl and index linked pages on the same domain

Response 201

{
  "id": 2,
  "name": "https://docs.example.com/getting-started",
  "type": "url",
  "status": "processing",
  "created_at": "2026-03-07T14:00:00Z"
}
The URL is scraped and indexed asynchronously. Check status via List Sources.

Errors

CodeDescription
401Missing or invalid authentication
404Agent not found
422Invalid URL format

Authorizations

Authorization
string
header
required

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

Body

application/json

Request to add a URL to knowledge base.

user_id
string
required
url
string
required
name
string | null
scraper_type
enum<string> | null
default:websitetools
Available options:
scrapling,
firecrawl,
newspaper,
jinareader,
trafilatura,
spider,
websitetools
max_depth
integer
default:1
Required range: 1 <= x <= 1000
Required range: 1 <= x <= 100

Response

Successful Response