# How to manage AI knowledge via API?

Knowledge items are the sources your AI answers from, alongside your published
articles. The Knowledge API lets you add, edit, and remove them programmatically
— new knowledge is ingested by the AI automatically, with no publish step.


KNOWLEDGE TYPES

typeWhat it is faqA question-and-answer pair. Carries one or more questions
(phrasings customers use) and one answer as content. conversationKnowledge
captured from a support conversation — a reusable answer distilled from a real
thread, linked back to it via conversation_id.

Please Note

> Knowledge is ingested asynchronously: the item exists immediately, and the AI
> can draw on it moments later. Updates re-ingest automatically, and deleting an
> item also removes it from the AI's index.


THE KNOWLEDGE OBJECT

{
  "id": "665f1a2b3c4d5e6f70809101",
  "object": "knowledge",
  "type": "faq",
  "center_id": "CENTER_ID",
  "questions": ["How do I reset my password?", "I forgot my password"],
  "tags": ["account"],
  "ai_reads": 12,
  "created_at": "2026-05-01T09:00:00.000Z",
  "updated_at": "2026-05-10T14:30:00.000Z",
  "content": { "html": "<p>Click 'Forgot password' on the sign-in page...</p>", "text": "..." }
}

type: "conversation" items carry a title and conversation_id instead of
questions. The content object is included when you pass expand[]=content (create
and update responses always include it). ai_reads counts how many times the AI
has read the item while generating answers — a useful signal for which knowledge
earns its keep.


CREATE AN FAQ

curl -s -X POST \
  -H "Authorization: Bearer $HC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "faq",
    "questions": ["How do I reset my password?", "I forgot my password"],
    "content": "<p>Click <strong>Forgot password</strong> on the sign-in page and follow the email link.</p>",
    "tags": ["account"]
  }' \
  "https://api.help.center/v0/centers/$HC_CENTER_ID/knowledge"

FieldRequiredDescription typeYesMust be "faq". questionsYesArray of question
phrasings, at least one. Add variants customers actually type. contentYesThe
answer, as HTML. Sanitized on save; a plain-text version is generated
automatically. tagsNoArray of tag strings for your own organization.


CREATE CONVERSATION KNOWLEDGE

When a conversation produced an answer worth reusing, capture it:

curl -s -X POST \
  -H "Authorization: Bearer $HC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "conversation",
    "title": "Refunds for annual plans",
    "content": "<p>Annual plans can be refunded pro-rata within 30 days...</p>",
    "conversation_id": "CONVERSATION_ID",
    "tags": ["billing"]
  }' \
  "https://api.help.center/v0/centers/$HC_CENTER_ID/knowledge"

title, content, and a valid conversation_id are required. Both create variants
return 201 with the full knowledge object.

Please Note

> Request bodies are validated strictly — unknown fields are rejected with a
> validation_error, and the error's param field names the offending field.


UPDATE KNOWLEDGE

curl -s -X PATCH \
  -H "Authorization: Bearer $HC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "<p>Updated answer...</p>",
    "tags": ["account", "security"]
  }' \
  "https://api.help.center/v0/centers/$HC_CENTER_ID/knowledge/KNOWLEDGE_ID"

All fields are optional: content and tags apply to both types, questions applies
to FAQs, and title applies to conversation knowledge. Content changes are
re-ingested by the AI automatically.


LIST, GET, AND DELETE

# List (newest first) — filter by type, include content
GET /v0/centers/:centerId/knowledge?type=faq&expand[]=content&limit=50

# Get one item
GET /v0/centers/:centerId/knowledge/:knowledgeId?expand[]=content

# Delete (also removes it from the AI's index)
DELETE /v0/centers/:centerId/knowledge/:knowledgeId

The list accepts limit (1–100, default 50) and reports has_more; cursor
parameters are not yet supported on this endpoint. Delete returns { "id": "...",
"object": "knowledge", "deleted": true }.


ERRORS

HTTP statusCodeMeaning 400invalid_typetype must be faq or conversation.
400invalid_conversation_idThe supplied conversation_id is not a valid ID.
400validation_errorA field is missing, empty, or unknown.
404knowledge_not_foundNo knowledge item with that ID on this center.


ENDPOINT REFERENCE

ActionMethodEndpointScope List
knowledgeGET/v0/centers/:centerId/knowledgecontent.read Get
knowledgeGET/v0/centers/:centerId/knowledge/:knowledgeIdcontent.read Create
knowledgePOST/v0/centers/:centerId/knowledgecontent.write Update
knowledgePATCH/v0/centers/:centerId/knowledge/:knowledgeIdcontent.write Delete
knowledgeDELETE/v0/centers/:centerId/knowledge/:knowledgeIdcontent.delete


NEXT STEPS

 * How to work with actions via API?
   [https://developers.help.center/article/1022-how-to-work-with-actions-via-api]
   — find the gaps worth turning into knowledge.