curl --request POST \
--url https://api.example.com/v1/knowledge-documents/{knowledgeDocumentId}/validation \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/v1/knowledge-documents/{knowledgeDocumentId}/validation"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/v1/knowledge-documents/{knowledgeDocumentId}/validation', 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.example.com/v1/knowledge-documents/{knowledgeDocumentId}/validation",
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://api.example.com/v1/knowledge-documents/{knowledgeDocumentId}/validation"
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://api.example.com/v1/knowledge-documents/{knowledgeDocumentId}/validation")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/knowledge-documents/{knowledgeDocumentId}/validation")
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{
"contentType": "<string>",
"createdAt": "<string>",
"createdById": "<string>",
"failureReason": "upload_expired",
"fileName": "<string>",
"fileSize": 123,
"id": "<string>",
"knowledgeFolderId": "<string>",
"name": "<string>",
"nbCitations": 123,
"pageId": "<string>",
"reviewStatus": "to_validate",
"status": "pending",
"summary": "<string>",
"type": "text",
"updatedAt": "<string>",
"updatedById": "<string>",
"url": "<string>",
"validatedAt": "<string>",
"validatedById": "<string>",
"workspace": {
"id": "<string>",
"name": "<string>",
"websiteUrl": "<string>"
}
}Validate a knowledge document
Marks a processed document as reviewed. Its reviewStatus becomes up_to_date for 3 months. Requires the KB V2.
curl --request POST \
--url https://api.example.com/v1/knowledge-documents/{knowledgeDocumentId}/validation \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/v1/knowledge-documents/{knowledgeDocumentId}/validation"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/v1/knowledge-documents/{knowledgeDocumentId}/validation', 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.example.com/v1/knowledge-documents/{knowledgeDocumentId}/validation",
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://api.example.com/v1/knowledge-documents/{knowledgeDocumentId}/validation"
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://api.example.com/v1/knowledge-documents/{knowledgeDocumentId}/validation")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/knowledge-documents/{knowledgeDocumentId}/validation")
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{
"contentType": "<string>",
"createdAt": "<string>",
"createdById": "<string>",
"failureReason": "upload_expired",
"fileName": "<string>",
"fileSize": 123,
"id": "<string>",
"knowledgeFolderId": "<string>",
"name": "<string>",
"nbCitations": 123,
"pageId": "<string>",
"reviewStatus": "to_validate",
"status": "pending",
"summary": "<string>",
"type": "text",
"updatedAt": "<string>",
"updatedById": "<string>",
"url": "<string>",
"validatedAt": "<string>",
"validatedById": "<string>",
"workspace": {
"id": "<string>",
"name": "<string>",
"websiteUrl": "<string>"
}
}Authorizations
API key starting with sk_. Generate one in Settings > API Keys.
Path Parameters
Knowledge document ID.
Response
Default Response
MIME type of the uploaded file. Null when the document has no file.
ISO 8601 creation date.
ID of the user who created the document.
Why processing failed. Null unless the status is failed.
upload_expired, unsupported_type, encrypted, page_too_large, too_large, optimization_timeout, processing_error, kb_failed Original file name. Null when the document has no file.
File size in bytes. Null when the document has no file.
Unique identifier of the knowledge document.
Knowledge folder holding the document. Null for the General folder and for page documents.
Name of the document.
Number of times AI content cited this document. Null for a document created before citations were counted and never cited since.
Page the document is attached to. Null for workspace documents.
to_validate when the document is 18 months old or more and was not validated in the last 3 months, up_to_date otherwise. Null until processing has succeeded.
to_validate, up_to_date Processing status.
pending, success, failed Summary of the document content.
Document type.
text, url, file ISO 8601 date of the last update.
ID of the user who last updated the document.
Source URL of a url document. Known on the single-document routes only, null elsewhere.
ISO 8601 date of the last validation.
ID of the user who last validated the document.
Workspace this knowledge document belongs to.
Show child attributes
Show child attributes
Was this page helpful?