curl --request PATCH \
--url https://api.exec.com/rest/v1/knowledge-hub/pages/{page_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Pricing objection guide (updated)",
"content": "## Handling pricing objections\n\nUpdated guidance…",
"status": "published"
}
'import requests
url = "https://api.exec.com/rest/v1/knowledge-hub/pages/{page_id}"
payload = {
"title": "Pricing objection guide (updated)",
"content": "## Handling pricing objections
Updated guidance…",
"status": "published"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Pricing objection guide (updated)',
content: '## Handling pricing objections\n\nUpdated guidance…',
status: 'published'
})
};
fetch('https://api.exec.com/rest/v1/knowledge-hub/pages/{page_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.exec.com/rest/v1/knowledge-hub/pages/{page_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 => json_encode([
'title' => 'Pricing objection guide (updated)',
'content' => '## Handling pricing objections
Updated guidance…',
'status' => 'published'
]),
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 := "https://api.exec.com/rest/v1/knowledge-hub/pages/{page_id}"
payload := strings.NewReader("{\n \"title\": \"Pricing objection guide (updated)\",\n \"content\": \"## Handling pricing objections\\n\\nUpdated guidance…\",\n \"status\": \"published\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.exec.com/rest/v1/knowledge-hub/pages/{page_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Pricing objection guide (updated)\",\n \"content\": \"## Handling pricing objections\\n\\nUpdated guidance…\",\n \"status\": \"published\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exec.com/rest/v1/knowledge-hub/pages/{page_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/json'
request.body = "{\n \"title\": \"Pricing objection guide (updated)\",\n \"content\": \"## Handling pricing objections\\n\\nUpdated guidance…\",\n \"status\": \"published\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"title": "<string>",
"status": "draft",
"visibility": "private",
"owner": {
"id": "<string>",
"email": "[email protected]",
"first_name": "<string>",
"last_name": "<string>"
},
"folders": [
{
"id": "<string>",
"name": "<string>",
"emoji": "<string>"
}
],
"skills": [
{
"id": "<string>",
"name": "<string>"
}
],
"source_count": 123,
"version": 123,
"cover": "<string>",
"published_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"content": "<string>",
"sources": [
{
"id": "<string>",
"title": "<string>",
"source_type": "upload",
"status": "pending",
"content_format": "markdown",
"token_count": 123,
"has_images": true,
"external_url": "<string>",
"summary": "<string>",
"cover": "<string>",
"folders": [
{
"id": "<string>",
"name": "<string>",
"emoji": "<string>"
}
],
"created_by": {
"id": "<string>",
"email": "[email protected]",
"first_name": "<string>",
"last_name": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"processed_at": "2023-11-07T05:31:56Z",
"content": "<string>"
}
],
"draft": {
"title": "<string>",
"content": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "invalid_pagination",
"message": "Invalid pagination parameters"
}
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid or inactive API key"
}
}{
"error": {
"type": "not_found",
"message": "Scenario not found: abc123"
}
}Update page
Updates a page. Only the fields you provide are changed; omitted fields
are left untouched. Editing content creates a new draft; set status
to published to publish the new version.
PUT is also accepted and behaves the same way.
curl --request PATCH \
--url https://api.exec.com/rest/v1/knowledge-hub/pages/{page_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Pricing objection guide (updated)",
"content": "## Handling pricing objections\n\nUpdated guidance…",
"status": "published"
}
'import requests
url = "https://api.exec.com/rest/v1/knowledge-hub/pages/{page_id}"
payload = {
"title": "Pricing objection guide (updated)",
"content": "## Handling pricing objections
Updated guidance…",
"status": "published"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Pricing objection guide (updated)',
content: '## Handling pricing objections\n\nUpdated guidance…',
status: 'published'
})
};
fetch('https://api.exec.com/rest/v1/knowledge-hub/pages/{page_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.exec.com/rest/v1/knowledge-hub/pages/{page_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 => json_encode([
'title' => 'Pricing objection guide (updated)',
'content' => '## Handling pricing objections
Updated guidance…',
'status' => 'published'
]),
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 := "https://api.exec.com/rest/v1/knowledge-hub/pages/{page_id}"
payload := strings.NewReader("{\n \"title\": \"Pricing objection guide (updated)\",\n \"content\": \"## Handling pricing objections\\n\\nUpdated guidance…\",\n \"status\": \"published\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.exec.com/rest/v1/knowledge-hub/pages/{page_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Pricing objection guide (updated)\",\n \"content\": \"## Handling pricing objections\\n\\nUpdated guidance…\",\n \"status\": \"published\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exec.com/rest/v1/knowledge-hub/pages/{page_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/json'
request.body = "{\n \"title\": \"Pricing objection guide (updated)\",\n \"content\": \"## Handling pricing objections\\n\\nUpdated guidance…\",\n \"status\": \"published\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"title": "<string>",
"status": "draft",
"visibility": "private",
"owner": {
"id": "<string>",
"email": "[email protected]",
"first_name": "<string>",
"last_name": "<string>"
},
"folders": [
{
"id": "<string>",
"name": "<string>",
"emoji": "<string>"
}
],
"skills": [
{
"id": "<string>",
"name": "<string>"
}
],
"source_count": 123,
"version": 123,
"cover": "<string>",
"published_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"content": "<string>",
"sources": [
{
"id": "<string>",
"title": "<string>",
"source_type": "upload",
"status": "pending",
"content_format": "markdown",
"token_count": 123,
"has_images": true,
"external_url": "<string>",
"summary": "<string>",
"cover": "<string>",
"folders": [
{
"id": "<string>",
"name": "<string>",
"emoji": "<string>"
}
],
"created_by": {
"id": "<string>",
"email": "[email protected]",
"first_name": "<string>",
"last_name": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"processed_at": "2023-11-07T05:31:56Z",
"content": "<string>"
}
],
"draft": {
"title": "<string>",
"content": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "invalid_pagination",
"message": "Invalid pagination parameters"
}
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid or inactive API key"
}
}{
"error": {
"type": "not_found",
"message": "Scenario not found: abc123"
}
}Authorizations
API key created in Settings > API.
Format: exec_live_ followed by 40 alphanumeric characters.
Path Parameters
The page's unique identifier (UUID)
Body
New page title
New markdown body (creates a new draft)
Set to published to publish the new version. To archive a page, use DELETE.
draft, published Replace the page's folders with these UUIDs
Replace the page's attached sources with these UUIDs
Replace the page's linked skills with these UUIDs
Response
Updated page
A single page with its published body, attached sources, and (optionally) its draft.
Unique page identifier (UUID)
Page title
Current page status
draft, published, archived Visibility scope of the page
private, workspace, global User who owns the page
Show child attributes
Show child attributes
Folders the page belongs to
Show child attributes
Show child attributes
Skills associated with the page
Show child attributes
Show child attributes
Number of sources attached to the page
Version number of the published version, or null if never published
Cover image reference (empty string if none)
When the page was last published
Markdown body of the published version (null if unpublished)
Sources attached to the page
Show child attributes
Show child attributes
Current draft (only included when requested via ?include=draft)
Show child attributes
Show child attributes