Import source URL
curl --request POST \
--url https://agent-evalserver-production.up.railway.app/api/agents/{id}/import-url \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"url": "https://example.com/refund-policy"
}
'import requests
url = "https://agent-evalserver-production.up.railway.app/api/agents/{id}/import-url"
payload = { "url": "https://example.com/refund-policy" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://example.com/refund-policy'})
};
fetch('https://agent-evalserver-production.up.railway.app/api/agents/{id}/import-url', 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://agent-evalserver-production.up.railway.app/api/agents/{id}/import-url",
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' => 'https://example.com/refund-policy'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://agent-evalserver-production.up.railway.app/api/agents/{id}/import-url"
payload := strings.NewReader("{\n \"url\": \"https://example.com/refund-policy\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://agent-evalserver-production.up.railway.app/api/agents/{id}/import-url")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/refund-policy\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://agent-evalserver-production.up.railway.app/api/agents/{id}/import-url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://example.com/refund-policy\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Knowledge imported successfully",
"article": {
"url": "https://example.com/refund-policy",
"title": "Refund Policy",
"summary": "Policy details for customer refunds.",
"wordCount": 1200,
"chunkCount": 8,
"preview": "Customers can request a refund within 30 days..."
},
"knowledge": {
"qaPairsStored": 6,
"usedDefaultFallback": false
}
}{
"error": "<string>",
"message": "<string>",
"details": "<string>"
}{
"error": "<string>",
"message": "<string>",
"details": "<string>"
}{
"error": "<string>",
"message": "<string>",
"details": "<string>"
}Source Import
Import source URL
Import source knowledge from a public web page.
POST
/
api
/
agents
/
{id}
/
import-url
Import source URL
curl --request POST \
--url https://agent-evalserver-production.up.railway.app/api/agents/{id}/import-url \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"url": "https://example.com/refund-policy"
}
'import requests
url = "https://agent-evalserver-production.up.railway.app/api/agents/{id}/import-url"
payload = { "url": "https://example.com/refund-policy" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://example.com/refund-policy'})
};
fetch('https://agent-evalserver-production.up.railway.app/api/agents/{id}/import-url', 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://agent-evalserver-production.up.railway.app/api/agents/{id}/import-url",
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' => 'https://example.com/refund-policy'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://agent-evalserver-production.up.railway.app/api/agents/{id}/import-url"
payload := strings.NewReader("{\n \"url\": \"https://example.com/refund-policy\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://agent-evalserver-production.up.railway.app/api/agents/{id}/import-url")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/refund-policy\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://agent-evalserver-production.up.railway.app/api/agents/{id}/import-url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://example.com/refund-policy\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Knowledge imported successfully",
"article": {
"url": "https://example.com/refund-policy",
"title": "Refund Policy",
"summary": "Policy details for customer refunds.",
"wordCount": 1200,
"chunkCount": 8,
"preview": "Customers can request a refund within 30 days..."
},
"knowledge": {
"qaPairsStored": 6,
"usedDefaultFallback": false
}
}{
"error": "<string>",
"message": "<string>",
"details": "<string>"
}{
"error": "<string>",
"message": "<string>",
"details": "<string>"
}{
"error": "<string>",
"message": "<string>",
"details": "<string>"
}Import Source URL
Import source knowledge from a public web page. Use this for published docs, help center articles, product pages, or other public source material that should inform evaluation questions.Endpoint
POST /api/agents/{id}/import-url
Authentication
Send your platform API key in thex-api-key header.
Path Parameters
| Name | Type | Description |
|---|---|---|
id | string<uuid> | Evaluation agent ID. |
Request Body
{
"url": "https://example.com/refund-policy"
}
Success Response
Returns200 OK with a summary of extracted article content and stored
knowledge.Authorizations
Platform API key for authenticated account-level API access
Path Parameters
Evaluation agent ID.
Body
application/json
Import source knowledge from a public web page.
Public HTTPS URL to process.
Example:
"https://example.com/refund-policy"
⌘I