Add URL data sources
curl --request POST \
--url https://api.wotnot.io/v1/ai/knowledge-base/{knowledge_base_id}/data-sources/webpages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"urls": [
"https://wotnot.io",
"https://wotnot.io/pricing"
]
}
'import requests
url = "https://api.wotnot.io/v1/ai/knowledge-base/{knowledge_base_id}/data-sources/webpages"
payload = { "urls": ["https://wotnot.io", "https://wotnot.io/pricing"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({urls: ['https://wotnot.io', 'https://wotnot.io/pricing']})
};
fetch('https://api.wotnot.io/v1/ai/knowledge-base/{knowledge_base_id}/data-sources/webpages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wotnot.io/v1/ai/knowledge-base/{knowledge_base_id}/data-sources/webpages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'urls' => [
'https://wotnot.io',
'https://wotnot.io/pricing'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wotnot.io/v1/ai/knowledge-base/{knowledge_base_id}/data-sources/webpages"
payload := strings.NewReader("{\n \"urls\": [\n \"https://wotnot.io\",\n \"https://wotnot.io/pricing\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.wotnot.io/v1/ai/knowledge-base/{knowledge_base_id}/data-sources/webpages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"urls\": [\n \"https://wotnot.io\",\n \"https://wotnot.io/pricing\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wotnot.io/v1/ai/knowledge-base/{knowledge_base_id}/data-sources/webpages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"urls\": [\n \"https://wotnot.io\",\n \"https://wotnot.io/pricing\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"data_sources": [
{
"knowledge_base_id": "29",
"id": 1335,
"name": "https://wotnot.io",
"source_type": "url",
"token": 0,
"refresh_frequency": null,
"last_trained_at": null,
"status": "in-progress",
"type": "url",
"created_at": "2025-07-07 05:09:34.218507",
"created_by": {
"id": 2,
"name": "System"
}
},
{
"knowledge_base_id": "29",
"id": 1336,
"name": "https://wotnot.io/pricing",
"source_type": "url",
"token": 0,
"refresh_frequency": null,
"last_trained_at": null,
"status": "in-progress",
"type": "url",
"created_at": "2025-07-07 05:09:34.218507",
"created_by": {
"id": 2,
"name": "System"
}
}
]
}{
"error": "BAD_REQUEST",
"ok": false,
"status": 400,
"message": [
{
"message": "\"urls[0]\" must be a valid uri",
"path": [
"urls",
0
]
},
{
"message": "\"urls\" does not contain 1 required value(s)",
"path": [
"urls"
]
}
]
}{
"message": "Please reach out to support to use this feature",
"ok": false,
"error": "UNAUTHORIZED_FEATURE",
"code": "UNAUTHORIZED_FEATURE",
"status": 401
}Add URL data sources
Adds one or more web pages to an existing knowledge base. Each URL you send becomes its own data source.
POST
/
v1
/
ai
/
knowledge-base
/
{knowledge_base_id}
/
data-sources
/
webpages
Add URL data sources
curl --request POST \
--url https://api.wotnot.io/v1/ai/knowledge-base/{knowledge_base_id}/data-sources/webpages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"urls": [
"https://wotnot.io",
"https://wotnot.io/pricing"
]
}
'import requests
url = "https://api.wotnot.io/v1/ai/knowledge-base/{knowledge_base_id}/data-sources/webpages"
payload = { "urls": ["https://wotnot.io", "https://wotnot.io/pricing"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({urls: ['https://wotnot.io', 'https://wotnot.io/pricing']})
};
fetch('https://api.wotnot.io/v1/ai/knowledge-base/{knowledge_base_id}/data-sources/webpages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wotnot.io/v1/ai/knowledge-base/{knowledge_base_id}/data-sources/webpages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'urls' => [
'https://wotnot.io',
'https://wotnot.io/pricing'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wotnot.io/v1/ai/knowledge-base/{knowledge_base_id}/data-sources/webpages"
payload := strings.NewReader("{\n \"urls\": [\n \"https://wotnot.io\",\n \"https://wotnot.io/pricing\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.wotnot.io/v1/ai/knowledge-base/{knowledge_base_id}/data-sources/webpages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"urls\": [\n \"https://wotnot.io\",\n \"https://wotnot.io/pricing\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wotnot.io/v1/ai/knowledge-base/{knowledge_base_id}/data-sources/webpages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"urls\": [\n \"https://wotnot.io\",\n \"https://wotnot.io/pricing\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"data_sources": [
{
"knowledge_base_id": "29",
"id": 1335,
"name": "https://wotnot.io",
"source_type": "url",
"token": 0,
"refresh_frequency": null,
"last_trained_at": null,
"status": "in-progress",
"type": "url",
"created_at": "2025-07-07 05:09:34.218507",
"created_by": {
"id": 2,
"name": "System"
}
},
{
"knowledge_base_id": "29",
"id": 1336,
"name": "https://wotnot.io/pricing",
"source_type": "url",
"token": 0,
"refresh_frequency": null,
"last_trained_at": null,
"status": "in-progress",
"type": "url",
"created_at": "2025-07-07 05:09:34.218507",
"created_by": {
"id": 2,
"name": "System"
}
}
]
}{
"error": "BAD_REQUEST",
"ok": false,
"status": 400,
"message": [
{
"message": "\"urls[0]\" must be a valid uri",
"path": [
"urls",
0
]
},
{
"message": "\"urls\" does not contain 1 required value(s)",
"path": [
"urls"
]
}
]
}{
"message": "Please reach out to support to use this feature",
"ok": false,
"error": "UNAUTHORIZED_FEATURE",
"code": "UNAUTHORIZED_FEATURE",
"status": 401
}Authorizations
All of WotNot's APIs use Bearer token authentication. Send your account token as Bearer <token>. You can find it in Settings > Account Settings > Developer. Keep it on your server: anyone who has it can call the API as your account.
Path Parameters
The ID of the knowledge base to add the URLs to.
Body
application/json
The web pages to add.
The web pages to add, at least one. Each must be a valid web address, for example https://wotnot.io/pricing.
Minimum array length:
1Response
Returns ok set to true and a data_sources list with one entry for each URL you sent. Each one starts with status set to in-progress.
Last modified on October 22, 2026
Was this page helpful?