Complete reference for the Knowledge Base Articles API. Create, publish, and manage KB articles programmatically.
Articles API Reference
Manage knowledge base articles programmatically.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /teams/{teamId}/articles |
List articles |
| POST | /teams/{teamId}/articles |
Create article |
| GET | /teams/{teamId}/articles/{articleId} |
Get article |
| PATCH | /teams/{teamId}/articles/{articleId} |
Update article |
| DELETE | /teams/{teamId}/articles/{articleId} |
Delete article |
List Articles
GET /api/v1/teams/{teamId}/articles
Query Parameters
| Parameter | Type | Description |
|---|---|---|
page |
integer | Page number (default: 1) |
pageSize |
integer | Items per page (default: 20, max: 100) |
status |
string | Filter by status (draft, published) |
category |
string | Filter by category |
isPublic |
boolean | Filter by public visibility |
search |
string | Search in title and content |
Example
curl "https://www.cstar.help/api/v1/teams/{teamId}/articles?status=published&isPublic=true" \
-H "Authorization: Bearer sk_live_xxx"
Response
{
"success": true,
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"title": "How to Reset Your Password",
"slug": "how-to-reset-password",
"excerpt": "Step-by-step guide to resetting your account password.",
"category": "getting-started",
"status": "published",
"isPublic": true,
"tags": ["account", "password", "security"],
"viewCount": 1234,
"useCount": 56,
"publishedAt": "2025-12-01T10:00:00Z",
"createdAt": "2025-11-15T10:00:00Z",
"updatedAt": "2025-12-14T10:30:00Z"
}
],
"pagination": {
"total": 45,
"page": 1,
"pageSize": 20,
"hasMore": true
}
}
Create Article
POST /api/v1/teams/{teamId}/articles
Request Body
{
"title": "How to Contact Support",
"content": "# How to Contact Support\\n\\nYou can reach us via...",
"category": "getting-started",
"status": "draft",
"isPublic": false,
"tags": ["support", "contact"],
"metaDescription": "Learn the different ways to contact our support team."
}
Required Fields
title: Article titlecategory: Category key
Optional Fields
content: Article body (Markdown supported)status: draft (default), publishedisPublic: false (default), true for public KB visibilityslug: URL slug (auto-generated from title if not provided)tags: Array of tag stringsmetaDescription: SEO meta description
Update Article
PATCH /api/v1/teams/{teamId}/articles/{articleId}
Request Body
{
"status": "published",
"isPublic": true
}
All fields are optional. Only include fields you want to update.
Publishing an Article
To publish an article to the public knowledge base:
{
"status": "published",
"isPublic": true
}
This sets publishedAt automatically if not already set.
Webhooks
Article events trigger webhooks:
article.created- New article createdarticle.updated- Article fields changedarticle.published- Article published to public KB
See Webhook Events Reference for payload details.