Make a hub the default one
curl --request POST \
--url https://api.tryfuse.ai/api/v1/business/knowledge-hubs/default \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"hubId": "<string>"
}
'import requests
url = "https://api.tryfuse.ai/api/v1/business/knowledge-hubs/default"
payload = { "hubId": "<string>" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({hubId: '<string>'})
};
fetch('https://api.tryfuse.ai/api/v1/business/knowledge-hubs/default', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"knowledgeHub": {
"id": "68a1f8509c41d20014b3ee41",
"isDefault": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}Knowledge hubs
Make a hub the default one
Marks one of your own hubs as the default one — the hub used when a campaign is created without a knowledgeHubId — and clears the flag on every other hub you own. A teammate’s hub is readable through GET /business/knowledge-hubs/{hubId} but cannot be made your default and answers 403 KNOWLEDGE_HUB_OWNER_ONLY. The response echoes the request; read the hub back with GET /business/knowledge-hubs/{hubId} to confirm.
Errors:
403KNOWLEDGE_HUB_OWNER_ONLY— The hub belongs to a teammate; you can read it, but only its owner can make it their default hub.404KNOWLEDGE_HUB_NOT_FOUND— No hub with that id, it was deleted, or it belongs to another team.422VALIDATION_FAILED— hubId missing or not a 24-character hex id.429RATE_LIMITED— More than 30 knowledge-hub/campaign requests in a minute (or 1000 in a day). Knowledge hubs share the campaigns bucket.
Requires one of the following token scopes: campaigns.
POST
/
business
/
knowledge-hubs
/
default
Make a hub the default one
curl --request POST \
--url https://api.tryfuse.ai/api/v1/business/knowledge-hubs/default \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"hubId": "<string>"
}
'import requests
url = "https://api.tryfuse.ai/api/v1/business/knowledge-hubs/default"
payload = { "hubId": "<string>" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({hubId: '<string>'})
};
fetch('https://api.tryfuse.ai/api/v1/business/knowledge-hubs/default', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"knowledgeHub": {
"id": "68a1f8509c41d20014b3ee41",
"isDefault": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}Authorizations
Your API token (af_…) as the Basic-auth username, with an empty password.
Body
application/json
24-character hex id of the hub to make the default; every other hub loses the flag.
Response
Success
Show child attributes
Show child attributes