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
}'
import requests
url = "https://api.thinnest.ai/knowledge/add-url"
headers = {
"Authorization": "Bearer " + "YOUR_THINNESTAI_API_KEY",
"Content-Type": "application/json",
}
payload = {
"agent_id": "ag_c47e7c97_b2f2",
"url": "https://docs.example.com/getting-started",
"scrape_subpages": false
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
const response = await fetch("https://api.thinnest.ai/knowledge/add-url", {
method: "POST",
headers: {
"Authorization": "Bearer " + "YOUR_THINNESTAI_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"agent_id": "ag_c47e7c97_b2f2",
"url": "https://docs.example.com/getting-started",
"scrape_subpages": false
}),
});
const data = await response.json();
console.log(data);
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
payload := []byte(`{
"agent_id": "ag_c47e7c97_b2f2",
"url": "https://docs.example.com/getting-started",
"scrape_subpages": false
}`)
req, _ := http.NewRequest("POST", "https://api.thinnest.ai/knowledge/add-url", bytes.NewBuffer(payload))
req.Header.Set("Authorization", "Bearer YOUR_THINNESTAI_API_KEY")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
{
"id": 2,
"name": "https://docs.example.com/getting-started",
"type": "url",
"status": "processing",
"created_at": "2026-03-07T14:00:00Z"
}
Knowledge
Add URL
Add a web page URL to an agent’s knowledge base.
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
}'
import requests
url = "https://api.thinnest.ai/knowledge/add-url"
headers = {
"Authorization": "Bearer " + "YOUR_THINNESTAI_API_KEY",
"Content-Type": "application/json",
}
payload = {
"agent_id": "ag_c47e7c97_b2f2",
"url": "https://docs.example.com/getting-started",
"scrape_subpages": false
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
const response = await fetch("https://api.thinnest.ai/knowledge/add-url", {
method: "POST",
headers: {
"Authorization": "Bearer " + "YOUR_THINNESTAI_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"agent_id": "ag_c47e7c97_b2f2",
"url": "https://docs.example.com/getting-started",
"scrape_subpages": false
}),
});
const data = await response.json();
console.log(data);
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
payload := []byte(`{
"agent_id": "ag_c47e7c97_b2f2",
"url": "https://docs.example.com/getting-started",
"scrape_subpages": false
}`)
req, _ := http.NewRequest("POST", "https://api.thinnest.ai/knowledge/add-url", bytes.NewBuffer(payload))
req.Header.Set("Authorization", "Bearer YOUR_THINNESTAI_API_KEY")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
{
"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
}'
import requests
url = "https://api.thinnest.ai/knowledge/add-url"
headers = {
"Authorization": "Bearer " + "YOUR_THINNESTAI_API_KEY",
"Content-Type": "application/json",
}
payload = {
"agent_id": "ag_c47e7c97_b2f2",
"url": "https://docs.example.com/getting-started",
"scrape_subpages": false
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
const response = await fetch("https://api.thinnest.ai/knowledge/add-url", {
method: "POST",
headers: {
"Authorization": "Bearer " + "YOUR_THINNESTAI_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"agent_id": "ag_c47e7c97_b2f2",
"url": "https://docs.example.com/getting-started",
"scrape_subpages": false
}),
});
const data = await response.json();
console.log(data);
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
payload := []byte(`{
"agent_id": "ag_c47e7c97_b2f2",
"url": "https://docs.example.com/getting-started",
"scrape_subpages": false
}`)
req, _ := http.NewRequest("POST", "https://api.thinnest.ai/knowledge/add-url", bytes.NewBuffer(payload))
req.Header.Set("Authorization", "Bearer YOUR_THINNESTAI_API_KEY")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
Request Body
The agent’s public ID (ag_*)
Web page URL to scrape and index
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"
}
Errors
| Code | Description |
|---|---|
401 | Missing or invalid authentication |
404 | Agent not found |
422 | Invalid URL format |
Authorizations
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.
Available options:
scrapling, firecrawl, newspaper, jinareader, trafilatura, spider, websitetools Required range:
1 <= x <= 1000Required range:
1 <= x <= 100Response
Successful Response
⌘I

