Update Content
curl --request PATCH \
--url https://api.example.com/knowledge/content/{content_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'name=<string>' \
--data 'description=<string>' \
--data 'metadata=<string>' \
--data 'reader_id=<string>'import requests
url = "https://api.example.com/knowledge/content/{content_id}"
payload = {
"name": "<string>",
"description": "<string>",
"metadata": "<string>",
"reader_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.patch(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
name: '<string>',
description: '<string>',
metadata: '<string>',
reader_id: '<string>'
})
};
fetch('https://api.example.com/knowledge/content/{content_id}', 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/knowledge/content/{content_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => "name=%3Cstring%3E&description=%3Cstring%3E&metadata=%3Cstring%3E&reader_id=%3Cstring%3E",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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://api.example.com/knowledge/content/{content_id}"
payload := strings.NewReader("name=%3Cstring%3E&description=%3Cstring%3E&metadata=%3Cstring%3E&reader_id=%3Cstring%3E")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.example.com/knowledge/content/{content_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("name=%3Cstring%3E&description=%3Cstring%3E&metadata=%3Cstring%3E&reader_id=%3Cstring%3E")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/knowledge/content/{content_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "name=%3Cstring%3E&description=%3Cstring%3E&metadata=%3Cstring%3E&reader_id=%3Cstring%3E"
response = http.request(request)
puts response.read_body{
"id": "3c2fc685-d451-4d47-b0c0-b9a544c672b7",
"name": "example.pdf",
"description": "",
"type": "application/pdf",
"size": "251261",
"metadata": {},
"access_count": 1,
"status": "completed",
"status_message": "",
"created_at": "2025-09-08T15:22:53Z",
"updated_at": "2025-09-08T15:22:54Z"
}{
"detail": "Bad request",
"error_code": "BAD_REQUEST"
}{
"detail": "Unauthenticated access",
"error_code": "UNAUTHENTICATED"
}{
"detail": "Not found",
"error_code": "NOT_FOUND"
}{
"detail": "Validation error",
"error_code": "VALIDATION_ERROR"
}{
"detail": "Internal server error",
"error_code": "INTERNAL_SERVER_ERROR"
}Knowledge
Update Content
Update content properties such as name, description, metadata, or processing configuration. Allows modification of existing content without re-uploading.
PATCH
/
knowledge
/
content
/
{content_id}
Update Content
curl --request PATCH \
--url https://api.example.com/knowledge/content/{content_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'name=<string>' \
--data 'description=<string>' \
--data 'metadata=<string>' \
--data 'reader_id=<string>'import requests
url = "https://api.example.com/knowledge/content/{content_id}"
payload = {
"name": "<string>",
"description": "<string>",
"metadata": "<string>",
"reader_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.patch(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
name: '<string>',
description: '<string>',
metadata: '<string>',
reader_id: '<string>'
})
};
fetch('https://api.example.com/knowledge/content/{content_id}', 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/knowledge/content/{content_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => "name=%3Cstring%3E&description=%3Cstring%3E&metadata=%3Cstring%3E&reader_id=%3Cstring%3E",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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://api.example.com/knowledge/content/{content_id}"
payload := strings.NewReader("name=%3Cstring%3E&description=%3Cstring%3E&metadata=%3Cstring%3E&reader_id=%3Cstring%3E")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.example.com/knowledge/content/{content_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("name=%3Cstring%3E&description=%3Cstring%3E&metadata=%3Cstring%3E&reader_id=%3Cstring%3E")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/knowledge/content/{content_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "name=%3Cstring%3E&description=%3Cstring%3E&metadata=%3Cstring%3E&reader_id=%3Cstring%3E"
response = http.request(request)
puts response.read_body{
"id": "3c2fc685-d451-4d47-b0c0-b9a544c672b7",
"name": "example.pdf",
"description": "",
"type": "application/pdf",
"size": "251261",
"metadata": {},
"access_count": 1,
"status": "completed",
"status_message": "",
"created_at": "2025-09-08T15:22:53Z",
"updated_at": "2025-09-08T15:22:54Z"
}{
"detail": "Bad request",
"error_code": "BAD_REQUEST"
}{
"detail": "Unauthenticated access",
"error_code": "UNAUTHENTICATED"
}{
"detail": "Not found",
"error_code": "NOT_FOUND"
}{
"detail": "Validation error",
"error_code": "VALIDATION_ERROR"
}{
"detail": "Internal server error",
"error_code": "INTERNAL_SERVER_ERROR"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Content ID
Query Parameters
Database ID to use
Knowledge base ID to use
Body
application/x-www-form-urlencoded
Response
Content updated successfully
Unique identifier for the content
Name of the content
Description of the content
MIME type of the content
Size of the content in bytes
ID of related content if linked
Additional metadata as key-value pairs
Number of times content has been accessed
Required range:
x >= 0Processing status of the content
Available options:
processing, completed, failed Status message or error details
Timestamp when content was created
Timestamp when content was last updated
Was this page helpful?