curl --request POST \
--url https://app.pepline.ai/api/v1/knowledge_sources/{id}/refresh \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.pepline.ai/api/v1/knowledge_sources/{id}/refresh"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.pepline.ai/api/v1/knowledge_sources/{id}/refresh', 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}/refresh",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.pepline.ai/api/v1/knowledge_sources/{id}/refresh"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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}/refresh")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pepline.ai/api/v1/knowledge_sources/{id}/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "knowledge_source",
"id": 123,
"kind": "text",
"title": "<string>",
"status": "ready",
"agents": [
"<string>"
],
"metadata": {},
"entries": {
"total": 123,
"ingested": 123,
"pending": 123,
"failed": 123
},
"archived": true,
"created_at": "2023-11-07T05:31:56Z",
"external_id": "<string>",
"url": "<string>",
"failure_reason": "<string>",
"language": "<string>",
"digest": "<string>",
"reading_brief": "<string>",
"refresh_every": "daily",
"next_refresh_at": "2023-11-07T05:31:56Z",
"max_pages": 123,
"last_update_at": "2023-11-07T05:31:56Z",
"body": "<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>"
}
}Refresh a source
One verb for every kind: re-fetches the page (url), re-discovers and re-fetches the site’s pages (website), re-processes the stored content (text/file). Asynchronous — 202 with the source in updating; poll the source until ready, attention or failed. Every refresh writes an update run (see /updates).
curl --request POST \
--url https://app.pepline.ai/api/v1/knowledge_sources/{id}/refresh \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.pepline.ai/api/v1/knowledge_sources/{id}/refresh"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.pepline.ai/api/v1/knowledge_sources/{id}/refresh', 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}/refresh",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.pepline.ai/api/v1/knowledge_sources/{id}/refresh"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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}/refresh")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pepline.ai/api/v1/knowledge_sources/{id}/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "knowledge_source",
"id": 123,
"kind": "text",
"title": "<string>",
"status": "ready",
"agents": [
"<string>"
],
"metadata": {},
"entries": {
"total": 123,
"ingested": 123,
"pending": 123,
"failed": 123
},
"archived": true,
"created_at": "2023-11-07T05:31:56Z",
"external_id": "<string>",
"url": "<string>",
"failure_reason": "<string>",
"language": "<string>",
"digest": "<string>",
"reading_brief": "<string>",
"refresh_every": "daily",
"next_refresh_at": "2023-11-07T05:31:56Z",
"max_pages": 123,
"last_update_at": "2023-11-07T05:31:56Z",
"body": "<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
Response
Accepted; the refresh runs in the background.
"knowledge_source"text, url, file, website Aggregated from the source's entries: ready (everything ingested), updating (work in flight — poll), attention (usable with some failed entries), failed (nothing usable).
ready, updating, attention, failed Slugs of the agents this source is active for.
Show child attributes
Show child attributes
Entry counts by status (one entry per page for websites).
Show child attributes
Show child attributes
The page (url) or site root (website).
Single-entry kinds: why processing failed, human-readable. Websites report per-entry reasons under /entries.
What the agent understood from this source (generated after each refresh).
Reading guidance for the whole source: what the agent should specifically look for on every page. Steers extraction only — facts still require a verbatim excerpt from the page.
Scheduled-refresh cadence; null = manual only. url/website kinds only.
daily, weekly, monthly, null When the scheduler owes the next refresh (any refresh resets the clock). null when manual.
website kind only.
When the last refresh run landed — the freshness stamp.
Full text. Present on retrieve/create/update for text/url/file; websites read per-page content via /entries.

