Add a URL to crawl
curl --request POST \
--url https://api.wondeya.com/v1/knowledge/urls \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"syncTtlMinutes": 61,
"topics": [
"<array>"
],
"agentId": {}
}
'import requests
url = "https://api.wondeya.com/v1/knowledge/urls"
payload = {
"url": "<string>",
"syncTtlMinutes": 61,
"topics": ["<array>"],
"agentId": {}
}
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({url: '<string>', syncTtlMinutes: 61, topics: ['<array>'], agentId: {}})
};
fetch('https://api.wondeya.com/v1/knowledge/urls', 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.wondeya.com/v1/knowledge/urls",
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([
'url' => '<string>',
'syncTtlMinutes' => 61,
'topics' => [
'<array>'
],
'agentId' => [
]
]),
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.wondeya.com/v1/knowledge/urls"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"syncTtlMinutes\": 61,\n \"topics\": [\n \"<array>\"\n ],\n \"agentId\": {}\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.wondeya.com/v1/knowledge/urls")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"syncTtlMinutes\": 61,\n \"topics\": [\n \"<array>\"\n ],\n \"agentId\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wondeya.com/v1/knowledge/urls")
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 \"url\": \"<string>\",\n \"syncTtlMinutes\": 61,\n \"topics\": [\n \"<array>\"\n ],\n \"agentId\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"agentId": {},
"kind": "<string>",
"title": "<string>",
"status": "<string>",
"lang": "<string>",
"translated": true,
"topics": [
"<string>"
],
"chunkCount": 123,
"tokenCount": 123,
"summary": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"error": "<string>",
"sourceLang": "<string>",
"fileName": "<string>",
"contentType": "<string>",
"byteSize": 123,
"url": "<string>",
"resolvedUrl": "<string>",
"lastFetchedAt": "2023-11-07T05:31:56Z",
"syncTtlMinutes": 123,
"nextSyncAt": "2023-11-07T05:31:56Z",
"claim": {
"es": "<string>",
"en": "<string>"
}
}Knowledge
Add a URL to crawl
Points the knowledge base at a public page. http/https only; private, loopback and link-local addresses are refused (SSRF). The page is fetched on a queue.
POST
/
v1
/
knowledge
/
urls
Add a URL to crawl
curl --request POST \
--url https://api.wondeya.com/v1/knowledge/urls \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"syncTtlMinutes": 61,
"topics": [
"<array>"
],
"agentId": {}
}
'import requests
url = "https://api.wondeya.com/v1/knowledge/urls"
payload = {
"url": "<string>",
"syncTtlMinutes": 61,
"topics": ["<array>"],
"agentId": {}
}
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({url: '<string>', syncTtlMinutes: 61, topics: ['<array>'], agentId: {}})
};
fetch('https://api.wondeya.com/v1/knowledge/urls', 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.wondeya.com/v1/knowledge/urls",
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([
'url' => '<string>',
'syncTtlMinutes' => 61,
'topics' => [
'<array>'
],
'agentId' => [
]
]),
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.wondeya.com/v1/knowledge/urls"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"syncTtlMinutes\": 61,\n \"topics\": [\n \"<array>\"\n ],\n \"agentId\": {}\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.wondeya.com/v1/knowledge/urls")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"syncTtlMinutes\": 61,\n \"topics\": [\n \"<array>\"\n ],\n \"agentId\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wondeya.com/v1/knowledge/urls")
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 \"url\": \"<string>\",\n \"syncTtlMinutes\": 61,\n \"topics\": [\n \"<array>\"\n ],\n \"agentId\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"agentId": {},
"kind": "<string>",
"title": "<string>",
"status": "<string>",
"lang": "<string>",
"translated": true,
"topics": [
"<string>"
],
"chunkCount": 123,
"tokenCount": 123,
"summary": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"error": "<string>",
"sourceLang": "<string>",
"fileName": "<string>",
"contentType": "<string>",
"byteSize": 123,
"url": "<string>",
"resolvedUrl": "<string>",
"lastFetchedAt": "2023-11-07T05:31:56Z",
"syncTtlMinutes": 123,
"nextSyncAt": "2023-11-07T05:31:56Z",
"claim": {
"es": "<string>",
"en": "<string>"
}
}Authorizations
A workspace API key: wdy_live_… / wdy_test_…. Created at POST /workspaces/{tenantId}/keys and shown exactly once.
Body
application/json
Absolute http/https URL.
Maximum string length:
2048Minutes before the page is crawled again. Floored at 60 (SECURITY.md invariant 5): a shorter cadence is a denial-of-wallet vector, not a freshness need.
Required range:
x >= 60Lowercase topic tags. An empty list makes the source universal.
Maximum array length:
12Response
null = the workspace pool.
upload, url or claim.
pending, ready, failed, …
The canonical corpus language of the chunks.
The index card: one English line naming what this covers.
A machine-readable failure code.
Show child attributes
Show child attributes