Edit pending proposal content
Saves a pending proposal's title and Markdown without publishing. New-article drafts stay synchronized; update proposals do not change the published article. Category changes use PATCH /kb-proposals/{id}.
Saves a pending proposal's title and Markdown without publishing. New-article drafts stay synchronized; update proposals do not change the published article. Category changes use PATCH /kb-proposals/{id}.
PATCH https://api.weav.com/v1/kb-proposals/{id}/content
Requires a token with the external-api:write ability.
Path parameters
idstringrequiredFormat: uuid.
Body
titlestringrequiredMaximum length: 255.
contentstringrequiredFull replacement Markdown, including image URLs and native components
Maximum length: 1048576.
Request
cURL
curl --request PATCH \
--url 'https://api.weav.com/v1/kb-proposals/{id}/content' \
--header "Authorization: Bearer ${WEAV_API_TOKEN}" \
--header 'Content-Type: application/json' \
--data '{
"title": "string",
"content": "string"
}'
JavaScript
const body = {
"title": "string",
"content": "string"
};
const response = await fetch("https://api.weav.com/v1/kb-proposals/{id}/content", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.WEAV_API_TOKEN}`,
'Content-Type': 'application/json'
},
body: JSON.stringify(body)
});
console.log(response.status);
Python
import os
import requests
headers = {"Authorization": f"Bearer {os.environ['WEAV_API_TOKEN']}"}
body = {"title": "string", "content": "string"}
response = requests.patch("https://api.weav.com/v1/kb-proposals/{id}/content", headers=headers, json=body)
print(response.status_code)
PHP
use GuzzleHttp\Client;
$client = new Client();
$response = $client->request('PATCH', 'https://api.weav.com/v1/kb-proposals/{id}/content', [
'headers' => ['Authorization' => 'Bearer '.getenv('WEAV_API_TOKEN')],
'json' => array (
'title' => 'string',
'content' => 'string',
),
]);
echo $response->getStatusCode();
Response
200OK401Unauthorized403Forbidden404Not Found409Conflict422Unprocessable Content

