Articles API

Manage and retrieve knowledge base articles.

List Articles

GET/api/support/{appSlug}/articles

Retrieve a list of published knowledge base articles.

Path/Query Parameters

appSlugstringrequiredYour app slug
searchstringSearch query for title and content
categorystringFilter by category
limitnumberNumber of results (default: 20)
offsetnumberPagination offset

Response

200List of articles
{
  "articles": [
    {
      "id": "uuid",
      "slug": "how-to-export-data",
      "title": "How to Export Data",
      "excerpt": "Learn how to export your data...",
      "category": "Features",
      "created_at": "2024-01-15T10:00:00Z",
      "view_count": 42
    }
  ],
  "total": 15,
  "hasMore": true
}
Example Requestbash
curl -X GET "https://support.example.com/api/support/myapp/articles?search=export&category=Features"

Get Article

GET/api/support/{appSlug}/articles/{slug}

Retrieve a single article by its slug.

Path/Query Parameters

appSlugstringrequiredYour app slug
slugstringrequiredArticle URL slug

Response

200Article details
{
  "id": "uuid",
  "slug": "how-to-export-data",
  "title": "How to Export Data",
  "content": "Full markdown content...",
  "category": "Features",
  "created_at": "2024-01-15T10:00:00Z",
  "updated_at": "2024-01-20T14:30:00Z",
  "view_count": 42,
  "related_articles": [...]
}
Example Requestbash
curl -X GET "https://support.example.com/api/support/myapp/articles/how-to-export-data"

Semantic Search

Use the semantic=true parameter to enable AI-powered semantic search. This searches by meaning rather than exact keywords.

Semantic Search Requestbash
curl -X GET "https://support.example.com/api/support/myapp/articles?search=download+my+information&semantic=true"

Semantic search requires a Pro plan and returns articles ranked by relevance.

AI Answer Generation

POST/api/support/{appSlug}/ai-answer

Generate an AI answer based on your knowledge base.

Request Body

questionstringrequiredUser question

Response

200AI-generated answer with sources
{
  "answer": "To export your data, go to Settings > Export...",
  "sources": [
    {
      "title": "How to Export Data",
      "slug": "how-to-export-data",
      "relevance": 0.95
    }
  ],
  "confidence": 0.87
}
AI Answer Requestbash
curl -X POST "https://support.example.com/api/support/myapp/ai-answer" \
  -H "Content-Type: application/json" \
  -d '{"question": "How do I export my data?"}'