Create an article
curl --request POST \
--url https://back.leap.onclarity.com/api/kb/articles/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "draft",
"source": "manually",
"expiration_date_start": "2023-11-07T05:31:56Z",
"expiration_date_end": "2023-11-07T05:31:56Z",
"is_public": true
}
'import requests
url = "https://back.leap.onclarity.com/api/kb/articles/create"
payload = {
"status": "draft",
"source": "manually",
"expiration_date_start": "2023-11-07T05:31:56Z",
"expiration_date_end": "2023-11-07T05:31:56Z",
"is_public": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
status: 'draft',
source: 'manually',
expiration_date_start: '2023-11-07T05:31:56Z',
expiration_date_end: '2023-11-07T05:31:56Z',
is_public: true
})
};
fetch('https://back.leap.onclarity.com/api/kb/articles/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "draft",
"source": "manually",
"expiration_date_start": "2023-11-07T05:31:56Z",
"expiration_date_end": "2023-11-07T05:31:56Z",
"is_public": true
}{
"code": "<string>",
"status": "error",
"message": "<string>",
"extra": {}
}{
"code": "<string>",
"status": "error",
"message": "<string>",
"extra": {}
}Knowledge base
Create an article
POST
/
api
/
kb
/
articles
/
create
Create an article
curl --request POST \
--url https://back.leap.onclarity.com/api/kb/articles/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "draft",
"source": "manually",
"expiration_date_start": "2023-11-07T05:31:56Z",
"expiration_date_end": "2023-11-07T05:31:56Z",
"is_public": true
}
'import requests
url = "https://back.leap.onclarity.com/api/kb/articles/create"
payload = {
"status": "draft",
"source": "manually",
"expiration_date_start": "2023-11-07T05:31:56Z",
"expiration_date_end": "2023-11-07T05:31:56Z",
"is_public": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
status: 'draft',
source: 'manually',
expiration_date_start: '2023-11-07T05:31:56Z',
expiration_date_end: '2023-11-07T05:31:56Z',
is_public: true
})
};
fetch('https://back.leap.onclarity.com/api/kb/articles/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "draft",
"source": "manually",
"expiration_date_start": "2023-11-07T05:31:56Z",
"expiration_date_end": "2023-11-07T05:31:56Z",
"is_public": true
}{
"code": "<string>",
"status": "error",
"message": "<string>",
"extra": {}
}{
"code": "<string>",
"status": "error",
"message": "<string>",
"extra": {}
}Authorizations
Your organization API key (it starts with anek_org_). The same key works on the Voice API and the Support API. See Authentication.
Body
application/json
Response
Document created, URL follows