curl --request POST \
--url https://app.pepline.ai/api/v1/knowledge_gaps/{id}/check \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.pepline.ai/api/v1/knowledge_gaps/{id}/check"
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_gaps/{id}/check', 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_gaps/{id}/check",
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_gaps/{id}/check"
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_gaps/{id}/check")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pepline.ai/api/v1/knowledge_gaps/{id}/check")
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_gap",
"id": 123,
"agent": "<string>",
"question": "<string>",
"occurrences": 123,
"status": "open",
"created_at": "2023-11-07T05:31:56Z",
"resolution_basis": "verified",
"conversation_id": 123,
"conversations": [
{
"conversation_id": 123,
"asked_at": "2023-11-07T05:31:56Z"
}
],
"knowledge_source_id": 123,
"resurfaced_from_id": 123,
"last_check": {
"checked_at": "2023-11-07T05:31:56Z",
"trigger": "owner",
"answerable": true,
"answer": "<string>",
"reason": "not_indexed",
"error": "<string>",
"reachable": [
{
"kind": "passage",
"id": 123,
"text": "<string>",
"source_id": 123,
"source_title": "<string>",
"band": "close"
}
]
},
"last_asked_at": "2023-11-07T05:31:56Z",
"resolved_at": "2023-11-07T05:31:56Z"
}{
"error": {
"type": "authentication_error",
"code": "missing_api_key",
"message": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "missing_api_key",
"message": "<string>",
"param": "<string>"
}
}Run the answer check now
Would the agent answer this question today? Reads what the agent can reach for it (its activated sources’ passages and facts) and judges whether that answers it; the result lands in last_check. Ingestion runs the same check on open gaps whenever a source finishes being read, resolving the ones the new material answers with resolution_basis: verified. One small model call; degrades to an unavailable check, never an error.
curl --request POST \
--url https://app.pepline.ai/api/v1/knowledge_gaps/{id}/check \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.pepline.ai/api/v1/knowledge_gaps/{id}/check"
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_gaps/{id}/check', 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_gaps/{id}/check",
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_gaps/{id}/check"
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_gaps/{id}/check")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pepline.ai/api/v1/knowledge_gaps/{id}/check")
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_gap",
"id": 123,
"agent": "<string>",
"question": "<string>",
"occurrences": 123,
"status": "open",
"created_at": "2023-11-07T05:31:56Z",
"resolution_basis": "verified",
"conversation_id": 123,
"conversations": [
{
"conversation_id": 123,
"asked_at": "2023-11-07T05:31:56Z"
}
],
"knowledge_source_id": 123,
"resurfaced_from_id": 123,
"last_check": {
"checked_at": "2023-11-07T05:31:56Z",
"trigger": "owner",
"answerable": true,
"answer": "<string>",
"reason": "not_indexed",
"error": "<string>",
"reachable": [
{
"kind": "passage",
"id": 123,
"text": "<string>",
"source_id": 123,
"source_title": "<string>",
"band": "close"
}
]
},
"last_asked_at": "2023-11-07T05:31:56Z",
"resolved_at": "2023-11-07T05:31:56Z"
}{
"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
The gap with its fresh check.
"knowledge_gap"Agent slug.
open, resolved, archived How the resolution was earned: verified (an answer check confirmed the agent can answer) or declared (the owner's word). Null while open.
verified, declared, null The latest conversation that asked it.
Every time the question was asked, newest first.
Show child attributes
Show child attributes
The source added to answer this gap, when one was (dashboard, or knowledge_gap_id on source creation).
The resolved gap this one came back from — the question returned despite the fix.
The latest answer check (owner-triggered or run by ingestion).
Show child attributes
Show child attributes

