Trash articles in bulk
curl --request DELETE \
--url https://{your-subdomain}.neetokb.com/api/external/v2/articles/bulk_destroy \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"article_ids": [
"getting-started",
"a-84af178b"
]
}
'const options = {
method: 'DELETE',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({article_ids: ['getting-started', 'a-84af178b']})
};
fetch('https://{your-subdomain}.neetokb.com/api/external/v2/articles/bulk_destroy', 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/bulk_destroy"
payload = { "article_ids": ["getting-started", "a-84af178b"] }
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text){
"trashed_articles": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "getting-started"
}
]
}{
"error": "Not found."
}{
"error": "<string>"
}Articles
Trash articles in bulk
This API moves up to 100 articles to the trash in one call. It is all-or-nothing: if any identifier is unknown, or any article is synced from another product, nothing is trashed. For CLI sessions, this needs the Manage articles permission.
DELETE
/
articles
/
bulk_destroy
Trash articles in bulk
curl --request DELETE \
--url https://{your-subdomain}.neetokb.com/api/external/v2/articles/bulk_destroy \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"article_ids": [
"getting-started",
"a-84af178b"
]
}
'const options = {
method: 'DELETE',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({article_ids: ['getting-started', 'a-84af178b']})
};
fetch('https://{your-subdomain}.neetokb.com/api/external/v2/articles/bulk_destroy', 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/bulk_destroy"
payload = { "article_ids": ["getting-started", "a-84af178b"] }
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text){
"trashed_articles": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "getting-started"
}
]
}{
"error": "Not found."
}{
"error": "<string>"
}Replace
Learn how to find your subdomain in Workspace subdomain.
{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.
Body
application/json
Between 1 and 100 articles, each given by slug, permalink identifier or UUID.
Required array length:
1 - 100 elementsExample:
["getting-started", "a-84af178b"]