curl --request POST \
--url https://api.athenahq.ai/api/v1/knowledge-base/pillars/merge \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"website_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_pillar_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_pillar_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://api.athenahq.ai/api/v1/knowledge-base/pillars/merge"
payload = {
"website_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_pillar_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_pillar_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
website_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
target_pillar_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
source_pillar_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://api.athenahq.ai/api/v1/knowledge-base/pillars/merge', 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.athenahq.ai/api/v1/knowledge-base/pillars/merge",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'website_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'target_pillar_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'source_pillar_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.athenahq.ai/api/v1/knowledge-base/pillars/merge"
payload := strings.NewReader("{\n \"website_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"target_pillar_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_pillar_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.post("https://api.athenahq.ai/api/v1/knowledge-base/pillars/merge")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"website_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"target_pillar_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_pillar_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.athenahq.ai/api/v1/knowledge-base/pillars/merge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"website_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"target_pillar_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_pillar_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"moved_fact_count": 123,
"merged_pillars": [
{
"id": "<string>",
"name": "<string>"
}
],
"pillar": {
"id": "<string>",
"name": "<string>"
}
}Merge Pillars
Merges 1-20 source pillars into a published target pillar: every fact on the sources (any review status) re-files onto the target, page links carry over keeping the stronger signal, and the source pillars are then deleted. The target must be a published pillar and must not appear among the sources. Unlike the other Knowledge Base writes, retries are strict: missing source ids are rejected rather than skipped, so re-read the pillars before retrying a failed merge. Requires a website-admin API key. Also available as the MCP tool merge_pillars.
curl --request POST \
--url https://api.athenahq.ai/api/v1/knowledge-base/pillars/merge \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"website_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_pillar_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_pillar_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://api.athenahq.ai/api/v1/knowledge-base/pillars/merge"
payload = {
"website_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_pillar_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_pillar_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
website_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
target_pillar_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
source_pillar_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://api.athenahq.ai/api/v1/knowledge-base/pillars/merge', 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.athenahq.ai/api/v1/knowledge-base/pillars/merge",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'website_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'target_pillar_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'source_pillar_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.athenahq.ai/api/v1/knowledge-base/pillars/merge"
payload := strings.NewReader("{\n \"website_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"target_pillar_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_pillar_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.post("https://api.athenahq.ai/api/v1/knowledge-base/pillars/merge")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"website_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"target_pillar_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_pillar_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.athenahq.ai/api/v1/knowledge-base/pillars/merge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"website_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"target_pillar_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source_pillar_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"moved_fact_count": 123,
"merged_pillars": [
{
"id": "<string>",
"name": "<string>"
}
],
"pillar": {
"id": "<string>",
"name": "<string>"
}
}Body
The website whose pillars to merge.
The published pillar that survives and receives the sources' facts.
Pillars to fold into the target. Deleted after the merge.
1 - 20 elementsResponse
Merge report
true Facts re-filed from the sources onto the target.
The deleted source pillars, in request order. A deleted pillar cannot be re-fetched, so this is the caller's record.
Show child attributes
Show child attributes
The surviving target pillar.
Show child attributes
Show child attributes
Was this page helpful?