Overview
Articles are knowledge base content that help customers find answers to common questions. Articles are organized into categories and can be searched by customers and agents.Article DocType Fields
TheHD Article DocType contains the following fields:
Auto-generated hash identifier
Article title
Article content in HTML format
Category the article belongs to (links to HD Article Category)
Article status: Published, Draft, or Archived
User who created the article
When the article was published
Number of times the article has been viewed
Get Article
Retrieve a single article with all details.This endpoint is defined in
helpdesk/api/knowledge_base.py:11 and allows guest accessThe article ID (hash identifier)
Response
Article ID
Article title
Article content
Author information from
frappe.utils.get_user_info_for_avatarWhen the article was created
Article status
Publication date
Last modification date
Display name of the category
Category ID
Current user’s feedback (0 if none, or feedback value)
Permissions
- Agents can view articles in any status
- Non-agents (including guests) can only view Published articles
- Throws
PermissionErrorif non-agent tries to access non-published article
Example Request
Search Articles
Search articles using natural language processing.This endpoint is defined in
helpdesk/api/article.py:44Search query text
Search Strategy
The search uses a progressive fallback approach:- Sanitize query: Remove special characters, convert to lowercase
- Direct search: Search for the full query
- Noun phrases: Extract noun phrases using TextBlob and search
- Nouns only: Extract individual nouns and search
- Uses both AND and OR matching modes for better results
Response
Returns an array of article matches with relevance scoring.Example Request
Delete Articles
Delete multiple articles at once.Array of article IDs to delete
Example Request
Create Category
Create a new article category with an initial article.Category name
Response
ID of the created article
ID of the created category
Example Request
Move Articles to Category
Move one or more articles to a different category.Target category ID
Array of article IDs to move
Validation
- Requires write permission on HD Article
- Prevents moving the last article from a category (throws error)
Example Request
Get Categories
Retrieve all article categories with article counts.Response
Returns array of category objects:Category ID
Display name
Last modification date
Number of published articles in this category
Behavior
- Sorted by article count (descending)
- Only includes categories with published articles
- General category appears first if it exists
Example Request
Get Category Articles
Get all published articles in a specific category.Category ID
Response
Returns array of article objects with:- name, title, published_on, modified
- author (with avatar info)
- content (truncated to 100 characters, HTML stripped)
Example Request
Merge Categories
Merge one category into another, moving all articles.Source category ID to merge from
Target category ID to merge into
Validation
- Requires delete permission on HD Article Category
- Source and target must be different
- Cannot merge the General category
Example Request
Get General Category
Retrieve the ID of the “General” category.Get Category Title
Get the display name of a category.Increment Article Views
Track article views (rate-limited to once per hour per user).Article ID
Rate Limiting
- Limited to 1 request per hour per user
- Uses Redis-based rate limiting