Revise improvement proposal
POST https://api.weav.com/v1/kb-proposals/{id}/revise
Requires a token with the external-api:write ability.
Path parameters
idstringrequiredFormat: uuid.
Body
instructionstringrequiredMaximum length: 2000.
Request
cURL
curl --request POST \
--url 'https://api.weav.com/v1/kb-proposals/{id}/revise' \
--header "Authorization: Bearer ${WEAV_API_TOKEN}" \
--header 'Content-Type: application/json' \
--data '{
"instruction": "string"
}'
JavaScript
const body = {
"instruction": "string"
};
const response = await fetch("https://api.weav.com/v1/kb-proposals/{id}/revise", {
method: "POST",
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 = {"instruction": "string"}
response = requests.post("https://api.weav.com/v1/kb-proposals/{id}/revise", headers=headers, json=body)
print(response.status_code)
PHP
use GuzzleHttp\Client;
$client = new Client();
$response = $client->request('POST', 'https://api.weav.com/v1/kb-proposals/{id}/revise', [
'headers' => ['Authorization' => 'Bearer '.getenv('WEAV_API_TOKEN')],
'json' => array (
'instruction' => 'string',
),
]);
echo $response->getStatusCode();
Response
200OK409Conflict
