Creates a new FAQ website. The domain slug is auto-generated from the title, and every new website starts with a General category holding a General subcategory, so you can add articles right away.
POSThttps://api.faqcraft.com/faq_websites
Headers
Name
Type
Value
AuthorizationRequired
STRING
Bearer $TOKEN
Content-TypeRequired
STRING
application/json
Body parameters
Name
Type
Description
titleRequired
STRING
Help center name.
domain
STRING
Subdomain slug for the help center. Generated from the title when omitted; lowercase letters, digits and hyphens.
custom_domain
STRING
Your own domain, such as help.example.com.
contact_email
STRING
Support address shown on the help center. Defaults to your account email.
google_analytics_code
STRING
Google Analytics measurement ID.
header_links
ARRAY
Navigation links in the header, each { label, url }.
Uploads the website's logo and replaces the previous one. Send the file as multipart/form-data in the logo field. logo_url in the response is a path on api.faqcraft.com. Returns the updated website.
Optional. Only return feedback with this rating: good, neutral or bad.
Headers
Name
Type
Value
AuthorizationRequired
STRING
Bearer $TOKEN
Response body
[
{
"id": "uuid",
"faq_article_id": "uuid",
"rating": "bad",
"message": "The screenshot does not match the current settings page.",
"ip_address": "203.0.113.7",
"article": { "id": "uuid", "title": "How to get started", "slug": "how-to-get-started" },
"created_at": "2024-01-17T14:20:00Z",
"updated_at": "2024-01-17T14:20:00Z"
}
]
Code examples
curl -X GET "https://api.faqcraft.com/faq_websites/website-uuid/faq_feedback" \
-H "Authorization: Bearer $TOKEN"
{
"id": "uuid",
"faq_website_id": "uuid",
"title": "Getting Started",
"slug": "getting-started",
"description": "Everything you need to know to get started",
"display_order": 1,
"subcategories_count": 0,
"articles_count": 0,
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-01-15T10:00:00Z"
}
Code examples
curl -X POST "https://api.faqcraft.com/faq_websites/website-uuid/faq_categories" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Getting Started",
"description": "Everything you need to know to get started"
}'
// Create a new category
const websiteId = 'your-website-uuid';
const response = await fetch(
`https://api.faqcraft.com/faq_websites/${websiteId}/faq_categories`,
{
method: 'POST',
headers: {
'Authorization': 'Bearer ' + yourToken,
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: 'Getting Started',
description: 'Everything you need to know to get started'
})
}
);
const category = await response.json();
console.log('Created category:', category.slug);
# Create a new category
import requests
website_id = 'your-website-uuid'
headers = {
'Authorization': f'Bearer {your_token}',
'Content-Type': 'application/json'
}
data = {
'title': 'Getting Started',
'description': 'Everything you need to know to get started'
}
response = requests.post(
f'https://api.faqcraft.com/faq_websites/{website_id}/faq_categories',
headers=headers,
json=data
)
category = response.json()
print(f"Created category: {category['slug']}")
// Example not available
# Create a new category
require 'net/http'
require 'json'
require 'uri'
website_id = 'your-website-uuid'
uri = URI("https://api.faqcraft.com/faq_websites/#{website_id}/faq_categories")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Authorization'] = "Bearer #{your_token}"
request['Content-Type'] = 'application/json'
request.body = {
title: 'Getting Started',
description: 'Everything you need to know to get started'
}.to_json
response = http.request(request)
category = JSON.parse(response.body)
puts "Created category: #{category['slug']}"
// Example not available
Update category
Updates a category. Send only the fields you want to change.
Returns the subcategories of a category, ordered by display_order. Articles belong to a subcategory, so use these IDs as faq_subcategory_id when you create an article.
Creates an article in one of the website's subcategories. faq_subcategory_id is required; get it from List subcategories. Content is Markdown. Send status "published" to publish right away, which stamps published_at and published_by; otherwise the article is saved as a draft.
# Create a new article
import requests
website_id = 'your-website-uuid'
headers = {
'Authorization': f'Bearer {your_token}',
'Content-Type': 'application/json'
}
data = {
'title': 'How to get started',
'content': '# Getting Started\n\nWelcome to our FAQ...',
'faq_subcategory_id': 'subcategory-uuid',
'status': 'draft'
}
response = requests.post(
f'https://api.faqcraft.com/faq_websites/{website_id}/faq_articles',
headers=headers,
json=data
)
article = response.json()
print(f"Created article: {article['slug']}")
// Example not available
# Create a new article
require 'net/http'
require 'json'
require 'uri'
website_id = 'your-website-uuid'
uri = URI("https://api.faqcraft.com/faq_websites/#{website_id}/faq_articles")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Authorization'] = "Bearer #{your_token}"
request['Content-Type'] = 'application/json'
request.body = {
title: 'How to get started',
content: "# Getting Started
Welcome to our FAQ...",
faq_subcategory_id: 'subcategory-uuid',
status: 'draft'
}.to_json
response = http.request(request)
article = JSON.parse(response.body)
puts "Created article: #{article['slug']}"
// Example not available
Update article
Updates an existing article. You can update any combination of title, slug, content, status, or subcategory. Setting status to published stamps published_at and published_by with the caller; setting it back to draft clears both.
Publishes a batch of articles in one request, so you can clear the drafts an agent wrote at once. Publishing is the approval: each article gets status published, and articles that were drafts get published_at stamped with the current time and published_by with the caller. Articles that were already published keep their original values. The batch is all or nothing; if one article fails validation, none is published and the API answers 400 with that article's error. Returns the published articles.
Uploads an image for an article and returns its URL, a path on api.faqcraft.com. Send the file as multipart/form-data in the image field, then reference the URL from the article's Markdown, for example .
[
{
"id": "uuid",
"title": "Getting Started",
"slug": "getting-started",
"description": "Everything you need to know to get started",
"display_order": 1,
"subcategories_count": 2,
"articles_count": 8
}
]
Code examples
curl -X GET "https://api.faqcraft.com/public/faq/help.example.com/categories"
// List categories of a public FAQ site (no authentication required)
const domain = 'help.example.com';
const response = await fetch(
`https://api.faqcraft.com/public/faq/${domain}/categories`
);
const categories = await response.json();
categories.forEach(c => console.log(c.title, c.articles_count));
# List categories of a public FAQ site (no authentication required)
import requests
domain = 'help.example.com'
response = requests.get(
f'https://api.faqcraft.com/public/faq/{domain}/categories'
)
categories = response.json()
for c in categories:
print(c['title'], c['articles_count'])
// Example not available
# Example not available
// Example not available
Get public category
Returns a category by slug, with its subcategories. No authentication required.
{
"id": "uuid",
"title": "Getting Started",
"slug": "getting-started",
"description": "Everything you need to know to get started",
"display_order": 1,
"subcategories_count": 2,
"articles_count": 8,
"subcategories": [
{
"id": "uuid",
"title": "Basics",
"slug": "basics",
"description": "The first steps after signing up",
"display_order": 1,
"articles_count": 4,
"category": { "id": "uuid", "title": "Getting Started", "slug": "getting-started" }
}
]
}
Code examples
curl -X GET "https://api.faqcraft.com/public/faq/help.example.com/categories/getting-started"
// Get a category of a public FAQ site (no authentication required)
const domain = 'help.example.com';
const categorySlug = 'getting-started';
const response = await fetch(
`https://api.faqcraft.com/public/faq/${domain}/categories/${categorySlug}`
);
const category = await response.json();
console.log('Subcategories:', category.subcategories.map(s => s.title));
# Get a category of a public FAQ site (no authentication required)
import requests
domain = 'help.example.com'
category_slug = 'getting-started'
response = requests.get(
f'https://api.faqcraft.com/public/faq/{domain}/categories/{category_slug}'
)
category = response.json()
print(f"Subcategories: {[s['title'] for s in category['subcategories']]}")
// Example not available
# Example not available
// Example not available
Get public subcategory
Returns a subcategory by slug, with its published articles, newest first. No authentication required.
curl -X GET "https://api.faqcraft.com/public/faq/help.example.com/categories/getting-started/subcategories/basics"
// Get a subcategory of a public FAQ site with its articles (no authentication required)
const domain = 'help.example.com';
const categorySlug = 'getting-started';
const subcategorySlug = 'basics';
const response = await fetch(
`https://api.faqcraft.com/public/faq/${domain}/categories/${categorySlug}/subcategories/${subcategorySlug}`
);
const subcategory = await response.json();
subcategory.articles.forEach(a => console.log(a.title));
# Get a subcategory of a public FAQ site with its articles (no authentication required)
import requests
domain = 'help.example.com'
category_slug = 'getting-started'
subcategory_slug = 'basics'
response = requests.get(
f'https://api.faqcraft.com/public/faq/{domain}/categories/{category_slug}/subcategories/{subcategory_slug}'
)
subcategory = response.json()
for a in subcategory['articles']:
print(a['title'])
// Example not available
# Example not available
// Example not available
Get public article
Returns a published article by its category, subcategory and article slugs, plus up to 5 other published articles from the same subcategory. Drafts answer 404. No authentication required.
curl -X GET "https://api.faqcraft.com/public/faq/help.example.com/articles/getting-started/basics/how-to-get-started"
// Get a published article (no authentication required)
const domain = 'help.example.com';
const categorySlug = 'getting-started';
const subcategorySlug = 'basics';
const articleSlug = 'how-to-get-started';
const response = await fetch(
`https://api.faqcraft.com/public/faq/${domain}/articles/${categorySlug}/${subcategorySlug}/${articleSlug}`
);
const article = await response.json();
console.log(article.title);
console.log('Related:', article.related_articles.length);
# Get a published article (no authentication required)
import requests
domain = 'help.example.com'
category_slug = 'getting-started'
subcategory_slug = 'basics'
article_slug = 'how-to-get-started'
response = requests.get(
f'https://api.faqcraft.com/public/faq/{domain}/articles/{category_slug}/{subcategory_slug}/{article_slug}'
)
article = response.json()
print(article['title'])
print(f"Related: {len(article['related_articles'])}")
// Example not available
# Example not available
// Example not available
Search public FAQ
Full-text search across published articles for a given FAQ domain. Returns up to 20 results, best match first; path is the article's path relative to /public/faq/:domain (/articles/<category_slug>/<subcategory_slug>/<article_slug>), so you can pass it straight to Get article. No authentication required.
Records a reader's rating of a published article, with an optional message. A message also emails the website's contact address. No authentication required.