Merge tags
curl --request POST \
--url https://{your-subdomain}.neetokb.com/api/external/v2/tags/merge \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"primary_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"secondary_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'const options = {
method: 'POST',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
primary_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
secondary_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://{your-subdomain}.neetokb.com/api/external/v2/tags/merge', 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/tags/merge"
payload = {
"primary_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"secondary_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"tag": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Billing",
"description": "<string>",
"style": "secondary",
"articles_count": 2
}
}{
"error": "Not found."
}{
"error": "<string>"
}Tags
Merge tags
This API merges tags into one. Articles that carry a secondary tag get the primary tag. The secondary tags are then deleted. If any tag is unknown, nothing is merged. For CLI sessions, this needs the Manage tags permission.
POST
/
tags
/
merge
Merge tags
curl --request POST \
--url https://{your-subdomain}.neetokb.com/api/external/v2/tags/merge \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"primary_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"secondary_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'const options = {
method: 'POST',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
primary_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
secondary_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://{your-subdomain}.neetokb.com/api/external/v2/tags/merge', 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/tags/merge"
payload = {
"primary_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"secondary_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"tag": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Billing",
"description": "<string>",
"style": "secondary",
"articles_count": 2
}
}{
"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
Response
OK - Tags merged. Returns the primary tag with its new article count.