Add discovered pages to a website source
curl --request POST \
--url https://app.pepline.ai/api/v1/knowledge_sources/{id}/entries \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"urls": [
"<string>"
],
"all_matching": true,
"q": "<string>",
"note": "<string>"
}
'import requests
url = "https://app.pepline.ai/api/v1/knowledge_sources/{id}/entries"
payload = {
"urls": ["<string>"],
"all_matching": True,
"q": "<string>",
"note": "<string>"
}
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: ['<string>'], all_matching: true, q: '<string>', note: '<string>'})
};
fetch('https://app.pepline.ai/api/v1/knowledge_sources/{id}/entries', 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://app.pepline.ai/api/v1/knowledge_sources/{id}/entries",
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' => [
'<string>'
],
'all_matching' => true,
'q' => '<string>',
'note' => '<string>'
]),
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://app.pepline.ai/api/v1/knowledge_sources/{id}/entries"
payload := strings.NewReader("{\n \"urls\": [\n \"<string>\"\n ],\n \"all_matching\": true,\n \"q\": \"<string>\",\n \"note\": \"<string>\"\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://app.pepline.ai/api/v1/knowledge_sources/{id}/entries")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"urls\": [\n \"<string>\"\n ],\n \"all_matching\": true,\n \"q\": \"<string>\",\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pepline.ai/api/v1/knowledge_sources/{id}/entries")
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 \"<string>\"\n ],\n \"all_matching\": true,\n \"q\": \"<string>\",\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"object": "knowledge_entry",
"id": 123,
"title": "<string>",
"status": "pending",
"created_at": "2023-11-07T05:31:56Z",
"url": "<string>",
"failure_reason": "<string>",
"ingested_at": "2023-11-07T05:31:56Z",
"reading_note": "<string>",
"link_excluded": true,
"pinned": true,
"retired": true
}
],
"has_more": true
}{
"error": {
"type": "authentication_error",
"code": "missing_api_key",
"message": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "missing_api_key",
"message": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "missing_api_key",
"message": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "missing_api_key",
"message": "<string>",
"param": "<string>"
}
}Knowledge sources
Add discovered pages to a website source
Promote pages from the source’s discovered list (GET …/pages) into read entries: pass urls, or all_matching: true with a token search q. New pages are created pinned and read now; pages un-ingested earlier are revived with their curation intact. An optional note steers every page in the batch. Website sources only (422 otherwise; 409 when archived). Answers 201 with the entries touched.
POST
/
knowledge_sources
/
{id}
/
entries
Add discovered pages to a website source
curl --request POST \
--url https://app.pepline.ai/api/v1/knowledge_sources/{id}/entries \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"urls": [
"<string>"
],
"all_matching": true,
"q": "<string>",
"note": "<string>"
}
'import requests
url = "https://app.pepline.ai/api/v1/knowledge_sources/{id}/entries"
payload = {
"urls": ["<string>"],
"all_matching": True,
"q": "<string>",
"note": "<string>"
}
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: ['<string>'], all_matching: true, q: '<string>', note: '<string>'})
};
fetch('https://app.pepline.ai/api/v1/knowledge_sources/{id}/entries', 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://app.pepline.ai/api/v1/knowledge_sources/{id}/entries",
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' => [
'<string>'
],
'all_matching' => true,
'q' => '<string>',
'note' => '<string>'
]),
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://app.pepline.ai/api/v1/knowledge_sources/{id}/entries"
payload := strings.NewReader("{\n \"urls\": [\n \"<string>\"\n ],\n \"all_matching\": true,\n \"q\": \"<string>\",\n \"note\": \"<string>\"\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://app.pepline.ai/api/v1/knowledge_sources/{id}/entries")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"urls\": [\n \"<string>\"\n ],\n \"all_matching\": true,\n \"q\": \"<string>\",\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pepline.ai/api/v1/knowledge_sources/{id}/entries")
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 \"<string>\"\n ],\n \"all_matching\": true,\n \"q\": \"<string>\",\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"object": "knowledge_entry",
"id": 123,
"title": "<string>",
"status": "pending",
"created_at": "2023-11-07T05:31:56Z",
"url": "<string>",
"failure_reason": "<string>",
"ingested_at": "2023-11-07T05:31:56Z",
"reading_note": "<string>",
"link_excluded": true,
"pinned": true,
"retired": true
}
],
"has_more": true
}{
"error": {
"type": "authentication_error",
"code": "missing_api_key",
"message": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "missing_api_key",
"message": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "missing_api_key",
"message": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "missing_api_key",
"message": "<string>",
"param": "<string>"
}
}Authorizations
Your secret key (pep_sk_…) from Settings → API. Keys are org-scoped; treat them like passwords.
Path Parameters
Body
application/json

