Create Knowledge Base
/v1/kb/knowledge-basesorg.permission.kb.createThe API key or user must hold at least one of them. Legacy roles still work; prefer the others for new keys.
Create a new Knowledge Base resource
Knowledge bases
A knowledge base is one help center site, with its own address, languages, theme and brand. Every org has a default knowledge base, and an org with several brands can add one knowledge base per brand.
A knowledge base is the site that holds your help content: its categories, its published articles, its theme and its settings. Admins manage knowledge bases in the knowledge base settings. Each one belongs to exactly one brand, and a brand can have only one knowledge base. The default knowledge base (default: true) uses the org's default brand. When you create a knowledge base, Kustomer also creates its root category. If you don't send a theme, Kustomer also creates a theme for it from the Midtown template.
Addresses
Every knowledge base has a unique subdomain. The help center is served at https://<subdomain>.kustomer.help for US orgs, https://<subdomain>.kustomer.support for EU orgs and https://<subdomain>.kustomer.info for India orgs. The default knowledge base's subdomain is the org name. Other knowledge bases must use the org name followed by a hyphen, such as acme-outdoors: lowercase letters, digits and hyphens, at most 63 characters, not ending in a hyphen. You can't change subdomain or brand after you create the knowledge base, and default is a reserved name.
The public knowledge base endpoints work out which knowledge base to serve from the subdomain of the host you call. Your org host, https://<org>.api.kustomerapp.com, serves the default knowledge base. Pass knowledgeBaseId to read a different one.
Settings
languagesmaps each language code to{ enabled, title }, wheretitleis the help center's title in that language.defaultLanguageis the knowledge base's main language. New knowledge bases default toen_usand the title "Knowledge Base".themeis the ID of the theme the help center uses. Changing it switches the site's look.logo,favicon,homepageTitleandmetaTagsbrand the site.noIndex: trueasks search engines not to index it.baseUrloverrides the address Kustomer uses when it builds links to the help center.
Custom domains
A custom domain serves the help center on your own hostname, such as help.example.com. When you add one, Kustomer requests a TLS certificate for it, and certificateStatus starts as PENDING_VALIDATION. You then add the DNS records that Kustomer provides: one to validate the certificate, and a CNAME that points your hostname at Kustomer. The domain is live once the certificate is ISSUED and domainStatus changes from pending to ready.
certificateStatus |
Meaning |
|---|---|
PENDING_VALIDATION |
Waiting for the validation DNS record. |
ISSUED |
The certificate is valid. |
VALIDATION_TIMED_OUT |
The record wasn't found in time. Update the domain to reissue the certificate. |
FAILED, EXPIRED, REVOKED, INACTIVE |
The certificate can't be used. |
Deleting an issued domain starts a removal that runs in the background, and domainStatus is pendingRemoval until it finishes. Removal can't finish while your DNS still points the hostname at Kustomer, so remove the CNAME record too.
Which endpoint to use
| To | Call |
|---|---|
| Create a knowledge base for a brand | POST /v1/kb/knowledge-bases |
| Read or change a knowledge base's settings | GET or PATCH /v1/kb/knowledge-bases/{id} |
| Add a custom domain | POST /v1/kb/knowledge-bases/{id}/domain |
| List custom domains, or check one's status | GET …/{id}/domains, with certificateStatus to filter, or GET …/{id}/domains/{domainId} |
| Change the hostname, or reissue a timed-out certificate | PUT …/{id}/domain/{domainId} |
| Remove a custom domain | DELETE …/{id}/domain/{domainId} |
This reference has no endpoint that lists knowledge bases. To find a knowledge base ID, read the knowledgeBase relationship of one of its categories, or the knowledgeBase in an article's categories. PATCH only changes the fields you send. Reads need a knowledge base read role, and writes need org.admin.kb.write or the matching permission.
Request body
application/jsonrequiredCreate a new Knowledge Base resource
"en_us"Responses
Created