curl --request PATCH \
--url https://{your-subdomain}.neetokb.com/api/external/v2/articles/{id} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"title": "Getting Started",
"state": "draft",
"html_content": "<h1>Welcome</h1><p>Example content</p>",
"slug": "getting-started",
"page_title": "Getting Started",
"meta_description": "A comprehensive guide to help you get started with our platform",
"category": [
"Installation",
"Getting Started"
]
}
'const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Getting Started',
state: 'draft',
html_content: '<h1>Welcome</h1><p>Example content</p>',
slug: 'getting-started',
page_title: 'Getting Started',
meta_description: 'A comprehensive guide to help you get started with our platform',
category: ['Installation', 'Getting Started']
})
};
fetch('https://{your-subdomain}.neetokb.com/api/external/v2/articles/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{your-subdomain}.neetokb.com/api/external/v2/articles/{id}"
payload = {
"title": "Getting Started",
"state": "draft",
"html_content": "<h1>Welcome</h1><p>Example content</p>",
"slug": "getting-started",
"page_title": "Getting Started",
"meta_description": "A comprehensive guide to help you get started with our platform",
"category": ["Installation", "Getting Started"]
}
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"article": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"title": "<string>",
"state": "<string>",
"permalink": "<string>",
"category": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"slug": "<string>",
"is_private": true,
"path": [
"<string>"
]
}
}
}Update article
This API allows to update an existing article. Pass category to move the article to another category. For CLI sessions, editing a draft needs the Modify articles permission. Setting state: published, or changing an already published article, also needs the Manage articles permission.
curl --request PATCH \
--url https://{your-subdomain}.neetokb.com/api/external/v2/articles/{id} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"title": "Getting Started",
"state": "draft",
"html_content": "<h1>Welcome</h1><p>Example content</p>",
"slug": "getting-started",
"page_title": "Getting Started",
"meta_description": "A comprehensive guide to help you get started with our platform",
"category": [
"Installation",
"Getting Started"
]
}
'const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Getting Started',
state: 'draft',
html_content: '<h1>Welcome</h1><p>Example content</p>',
slug: 'getting-started',
page_title: 'Getting Started',
meta_description: 'A comprehensive guide to help you get started with our platform',
category: ['Installation', 'Getting Started']
})
};
fetch('https://{your-subdomain}.neetokb.com/api/external/v2/articles/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{your-subdomain}.neetokb.com/api/external/v2/articles/{id}"
payload = {
"title": "Getting Started",
"state": "draft",
"html_content": "<h1>Welcome</h1><p>Example content</p>",
"slug": "getting-started",
"page_title": "Getting Started",
"meta_description": "A comprehensive guide to help you get started with our platform",
"category": ["Installation", "Getting Started"]
}
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"article": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"title": "<string>",
"state": "<string>",
"permalink": "<string>",
"category": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"slug": "<string>",
"is_private": true,
"path": [
"<string>"
]
}
}
}{your-subdomain} with your workspace’s subdomain. Learn how to find your subdomain in Workspace subdomain.
Headers
Use the X-Api-Key header to provide your workspace API key. Refer to Authentication for more information.
Path Parameters
Unique identifier of the article (permalink identifier). Refer to the NeetoKB help article for detailed instructions.
"a-84af178b"
Body
Title of the article.
"Getting Started"
Status of the article.
draft, published "draft"
Content of the article in HTML format.
"<h1>Welcome</h1><p>Example content</p>"
URL-friendly version of the article's title. Can only be modified if the article's state is published.
"getting-started"
Moves the article to another category. Provide the category path as an array of category names, most specific first. Categories that do not exist are created.
["Installation", "Getting Started"]
Response
OK - Request succeeded
Hide child attributes
Hide child attributes