Switch a knowledge base folder on or off
curl --request PUT \
--url http://localhost:8080/knowledgebase-items/folders/visibility \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"folder": "<string>"
}
'import requests
url = "http://localhost:8080/knowledgebase-items/folders/visibility"
payload = { "folder": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({folder: '<string>'})
};
fetch('http://localhost:8080/knowledgebase-items/folders/visibility', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/knowledgebase-items/folders/visibility",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'folder' => '<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 := "http://localhost:8080/knowledgebase-items/folders/visibility"
payload := strings.NewReader("{\n \"folder\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("http://localhost:8080/knowledgebase-items/folders/visibility")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"folder\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/knowledgebase-items/folders/visibility")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"folder\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"updated_count": 123
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}Knowledge base items
Switch a knowledge base folder on or off
Switch a knowledge base folder on or off — Set whether the AI can use a synced Confluence folder, now and for pages synced into it later.
PUT
/
knowledgebase-items
/
folders
/
visibility
Switch a knowledge base folder on or off
curl --request PUT \
--url http://localhost:8080/knowledgebase-items/folders/visibility \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"folder": "<string>"
}
'import requests
url = "http://localhost:8080/knowledgebase-items/folders/visibility"
payload = { "folder": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({folder: '<string>'})
};
fetch('http://localhost:8080/knowledgebase-items/folders/visibility', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/knowledgebase-items/folders/visibility",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'folder' => '<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 := "http://localhost:8080/knowledgebase-items/folders/visibility"
payload := strings.NewReader("{\n \"folder\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("http://localhost:8080/knowledgebase-items/folders/visibility")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"folder\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/knowledgebase-items/folders/visibility")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"folder\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"updated_count": 123
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}The setting applies to every item under the folder now and to pages synced into it later. Settings on folders below it are cleared, so the nearest setting wins: to use only one folder, switch the Confluence source (
root) off first, then switch that folder on.
Answers 404 when the folder doesn’t exist in your organization, for example an id from another organization or one that was never synced.
Pages from Confluence personal spaces are never shown to the AI by this call; show them one page at a time.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Available options:
confluence, notion, zendesk_support, shopify, gitbook, intercom, front, freshdesk, hubspot_kb, genesys, ai_instructions, custom_training, website, workflow, help_center Folder id from list knowledge base folders
Available options:
internal, public Response
Default Response
Items whose setting changed
Was this page helpful?