PUT https://services.leadconnectorhq.com/knowledge-bases/{id}
Autorización
Bearer token generado desde el portal Leadway. Ver Autenticación.
Version
string
default:"2021-07-28"
required
Versión de la API.
Path parameters
Body
field to update the name of the knowledge base
field to update the description of the knowledge base
Respuestas
200 - Knowledge base updated successfully
message
string
default:"Bad Request"
{
"statusCode": 400,
"message": "Bad Request"
}
message
string
default:"Invalid token: access token is invalid"
error
string
default:"Unauthorized"
{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}
Ejemplo
curl -X PUT 'https://services.leadconnectorhq.com/knowledge-bases/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"name": "string",
"description": "string"
}'
const response = await fetch('https://services.leadconnectorhq.com/knowledge-bases/YOUR_id', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"name": "string", "description": "string"}),
});
const data = await response.json();
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/knowledge-bases/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"name": "string", "description": "string"},
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/knowledge-bases/YOUR_id');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'name': 'string', 'description': 'string'}),
]);
$data = json_decode(curl_exec($ch), true);