Skip to content

API Documentation

The FAQCraft API is easy to use and free for all plans.

Endpoints

FAQ Websites

List websites

Returns a list of all FAQ websites owned by the authenticated user.

GET https://api.faqcraft.com/faq_websites

Headers

Name Type Value
Authorization Required STRING Bearer $TOKEN

Response body

[
  {
    "id": "uuid",
    "user_id": "uuid",
    "title": "My Help Center",
    "domain": "my-help-center",
    "custom_domain": "help.example.com",
    "contact_email": "support@example.com",
    "logo_url": null,
    "google_analytics_code": null,
    "header_links": [],
    "footer_links": [],
    "categories_count": 3,
    "articles_count": 12,
    "published_count": 9,
    "feedback_count": 5,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
]

Code examples

curl -X GET "https://api.faqcraft.com/faq_websites" \
  -H "Authorization: Bearer $TOKEN"
// List all FAQ websites
const response = await fetch('https://api.faqcraft.com/faq_websites', {
  headers: {
    'Authorization': 'Bearer ' + yourToken
  }
});

const websites = await response.json();
console.log('Websites:', websites.length);
# List all FAQ websites
import requests

headers = {
    'Authorization': f'Bearer {your_token}'
}

response = requests.get(
    'https://api.faqcraft.com/faq_websites',
    headers=headers
)

websites = response.json()
print(f"Websites: {len(websites)}")
// Example not available
# List all FAQ websites
require 'net/http'
require 'json'
require 'uri'

uri = URI('https://api.faqcraft.com/faq_websites')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Get.new(uri)
request['Authorization'] = "Bearer #{your_token}"

response = http.request(request)
websites = JSON.parse(response.body)
puts "Websites: #{websites.length}"
// Example not available

Get website

Returns a single FAQ website by ID, including category and article counts.

GET https://api.faqcraft.com/faq_websites/:id

Headers

Name Type Value
Authorization Required STRING Bearer $TOKEN

Response body

{
  "id": "uuid",
  "user_id": "uuid",
  "title": "My Help Center",
  "domain": "my-help-center",
  "custom_domain": "help.example.com",
  "contact_email": "support@example.com",
  "logo_url": null,
  "google_analytics_code": "G-XXXXXXXXXX",
  "header_links": [{"label": "Home", "url": "https://example.com"}],
  "footer_links": [{"label": "Privacy", "url": "https://example.com/privacy"}],
  "categories_count": 3,
  "articles_count": 12,
  "published_count": 9,
  "feedback_count": 5,
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}

Code examples

curl -X GET "https://api.faqcraft.com/faq_websites/uuid" \
  -H "Authorization: Bearer $TOKEN"
// Get a single FAQ website
const websiteId = 'your-website-uuid';
const response = await fetch(
  `https://api.faqcraft.com/faq_websites/${websiteId}`,
  {
    headers: {
      'Authorization': 'Bearer ' + yourToken
    }
  }
);

const website = await response.json();
console.log('Website:', website.title);
# Get a single FAQ website
import requests

website_id = 'your-website-uuid'
headers = {
    'Authorization': f'Bearer {your_token}'
}

response = requests.get(
    f'https://api.faqcraft.com/faq_websites/{website_id}',
    headers=headers
)

website = response.json()
print(f"Website: {website['title']}")
// Example not available
# Get a single FAQ website
require 'net/http'
require 'json'
require 'uri'

website_id = 'your-website-uuid'
uri = URI("https://api.faqcraft.com/faq_websites/#{website_id}")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Get.new(uri)
request['Authorization'] = "Bearer #{your_token}"

response = http.request(request)
website = JSON.parse(response.body)
puts "Website: #{website['title']}"
// Example not available

Create website

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.

POST https://api.faqcraft.com/faq_websites

Headers

Name Type Value
Authorization Required STRING Bearer $TOKEN
Content-Type Required STRING application/json

Body parameters

Name Type Description
title Required 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 }.
footer_links ARRAY Links in the footer, each { label, url }.

Response body

{
  "id": "uuid",
  "user_id": "uuid",
  "title": "My Help Center",
  "domain": "my-help-center",
  "custom_domain": null,
  "contact_email": "support@example.com",
  "logo_url": null,
  "google_analytics_code": null,
  "header_links": [],
  "footer_links": [],
  "categories_count": 1,
  "articles_count": 0,
  "published_count": 0,
  "feedback_count": 0,
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}

Code examples

curl -X POST "https://api.faqcraft.com/faq_websites" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "My Help Center",
    "contact_email": "support@example.com"
  }'
// Create a new FAQ website
const response = await fetch('https://api.faqcraft.com/faq_websites', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + yourToken,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    title: 'My Help Center',
    contact_email: 'support@example.com'
  })
});

const website = await response.json();
console.log('Created website:', website.domain);
# Create a new FAQ website
import requests

headers = {
    'Authorization': f'Bearer {your_token}',
    'Content-Type': 'application/json'
}

data = {
    'title': 'My Help Center',
    'contact_email': 'support@example.com'
}

response = requests.post(
    'https://api.faqcraft.com/faq_websites',
    headers=headers,
    json=data
)

website = response.json()
print(f"Created website: {website['domain']}")
// Example not available
# Create a new FAQ website
require 'net/http'
require 'json'
require 'uri'

uri = URI('https://api.faqcraft.com/faq_websites')
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: 'My Help Center',
  contact_email: 'support@example.com'
}.to_json

response = http.request(request)
website = JSON.parse(response.body)
puts "Created website: #{website['domain']}"
// Example not available

Update website

Updates an existing FAQ website. You can update the title, contact email, custom domain, Google Analytics code, and navigation links.

PATCH https://api.faqcraft.com/faq_websites/:id

Headers

Name Type Value
Authorization Required STRING Bearer $TOKEN
Content-Type Required STRING application/json

Body parameters

Name Type Description
title STRING Help center name.
domain STRING Subdomain slug for the help center. Unchanged 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.
google_analytics_code STRING Google Analytics measurement ID.
header_links ARRAY Navigation links in the header, each { label, url }.
footer_links ARRAY Links in the footer, each { label, url }.

Response body

{
  "id": "uuid",
  "user_id": "uuid",
  "title": "Updated Help Center",
  "domain": "my-help-center",
  "custom_domain": "help.example.com",
  "contact_email": "support@example.com",
  "logo_url": null,
  "google_analytics_code": "G-XXXXXXXXXX",
  "header_links": [{"label": "Home", "url": "https://example.com"}],
  "footer_links": [],
  "categories_count": 3,
  "articles_count": 12,
  "published_count": 9,
  "feedback_count": 5,
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-16T08:00:00Z"
}

Code examples

curl -X PATCH "https://api.faqcraft.com/faq_websites/uuid" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Updated Help Center",
    "custom_domain": "help.example.com"
  }'
// Update an FAQ website
const websiteId = 'your-website-uuid';
const response = await fetch(
  `https://api.faqcraft.com/faq_websites/${websiteId}`,
  {
    method: 'PATCH',
    headers: {
      'Authorization': 'Bearer ' + yourToken,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      title: 'Updated Help Center',
      custom_domain: 'help.example.com'
    })
  }
);

const website = await response.json();
console.log('Updated:', website.title);
# Update an FAQ website
import requests

website_id = 'your-website-uuid'
headers = {
    'Authorization': f'Bearer {your_token}',
    'Content-Type': 'application/json'
}

data = {
    'title': 'Updated Help Center',
    'custom_domain': 'help.example.com'
}

response = requests.patch(
    f'https://api.faqcraft.com/faq_websites/{website_id}',
    headers=headers,
    json=data
)

website = response.json()
print(f"Updated: {website['title']}")
// Example not available
# Update an FAQ website
require 'net/http'
require 'json'
require 'uri'

website_id = 'your-website-uuid'
uri = URI("https://api.faqcraft.com/faq_websites/#{website_id}")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(uri)
request['Authorization'] = "Bearer #{your_token}"
request['Content-Type'] = 'application/json'
request.body = {
  title: 'Updated Help Center',
  custom_domain: 'help.example.com'
}.to_json

response = http.request(request)
website = JSON.parse(response.body)
puts "Updated: #{website['title']}"
// Example not available

List feedback

Returns the ratings and messages readers left on the website's articles, newest first.

GET https://api.faqcraft.com/faq_websites/:website_id/faq_feedback

Query parameters

Name Type Description
rating STRING Optional. Only return feedback with this rating: good, neutral or bad.

Headers

Name Type Value
Authorization Required 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"
// List reader feedback for a website
const websiteId = 'your-website-uuid';
const response = await fetch(
  `https://api.faqcraft.com/faq_websites/${websiteId}/faq_feedback`,
  {
    headers: {
      'Authorization': 'Bearer ' + yourToken
    }
  }
);

const feedback = await response.json();
console.log('Feedback entries:', feedback.length);
# List reader feedback for a website
import requests

website_id = 'your-website-uuid'
headers = {
    'Authorization': f'Bearer {your_token}'
}

response = requests.get(
    f'https://api.faqcraft.com/faq_websites/{website_id}/faq_feedback',
    headers=headers
)

feedback = response.json()
print(f"Feedback entries: {len(feedback)}")
// Example not available
# Example not available
// Example not available

Delete website

Soft deletes an FAQ website and all its content (categories, subcategories, articles).

DELETE https://api.faqcraft.com/faq_websites/:id

Headers

Name Type Value
Authorization Required STRING Bearer $TOKEN

Response body

HTTP 200 OK (empty body)

Code examples

curl -X DELETE "https://api.faqcraft.com/faq_websites/uuid" \
  -H "Authorization: Bearer $TOKEN"
// Delete an FAQ website
const websiteId = 'your-website-uuid';
const response = await fetch(
  `https://api.faqcraft.com/faq_websites/${websiteId}`,
  {
    method: 'DELETE',
    headers: {
      'Authorization': 'Bearer ' + yourToken
    }
  }
);

if (response.ok) {
  console.log('Website deleted successfully');
}
# Delete an FAQ website
import requests

website_id = 'your-website-uuid'
headers = {
    'Authorization': f'Bearer {your_token}'
}

response = requests.delete(
    f'https://api.faqcraft.com/faq_websites/{website_id}',
    headers=headers
)

if response.ok:
    print('Website deleted successfully')
// Example not available
# Delete an FAQ website
require 'net/http'
require 'uri'

website_id = 'your-website-uuid'
uri = URI("https://api.faqcraft.com/faq_websites/#{website_id}")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(uri)
request['Authorization'] = "Bearer #{your_token}"

response = http.request(request)
puts 'Website deleted successfully' if response.code == '200'
// Example not available

Categories

List categories

Returns all categories for a given FAQ website.

GET https://api.faqcraft.com/faq_websites/:website_id/faq_categories

Headers

Name Type Value
Authorization Required STRING Bearer $TOKEN

Response body

[
  {
    "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": 2,
    "articles_count": 8,
    "created_at": "2024-01-15T10:00:00Z",
    "updated_at": "2024-01-15T10:00:00Z"
  }
]

Code examples

curl -X GET "https://api.faqcraft.com/faq_websites/website-uuid/faq_categories" \
  -H "Authorization: Bearer $TOKEN"
// List categories for a website
const websiteId = 'your-website-uuid';
const response = await fetch(
  `https://api.faqcraft.com/faq_websites/${websiteId}/faq_categories`,
  {
    headers: {
      'Authorization': 'Bearer ' + yourToken
    }
  }
);

const categories = await response.json();
console.log('Total categories:', categories.length);
# List categories for a website
import requests

website_id = 'your-website-uuid'
headers = {
    'Authorization': f'Bearer {your_token}'
}

response = requests.get(
    f'https://api.faqcraft.com/faq_websites/{website_id}/faq_categories',
    headers=headers
)

categories = response.json()
print(f"Total categories: {len(categories)}")
// Example not available
# List categories for a website
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::Get.new(uri)
request['Authorization'] = "Bearer #{your_token}"

response = http.request(request)
categories = JSON.parse(response.body)
puts "Total categories: #{categories.length}"
// Example not available

Get category

Returns a single category with its subcategory and article counts.

GET https://api.faqcraft.com/faq_websites/:website_id/faq_categories/:id

Headers

Name Type Value
Authorization Required STRING Bearer $TOKEN

Response body

{
  "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": 2,
  "articles_count": 8,
  "created_at": "2024-01-15T10:00:00Z",
  "updated_at": "2024-01-15T10:00:00Z"
}

Code examples

curl -X GET "https://api.faqcraft.com/faq_websites/website-uuid/faq_categories/category-uuid" \
  -H "Authorization: Bearer $TOKEN"
// Get a single category
const websiteId = 'your-website-uuid';
const categoryId = 'your-category-uuid';
const response = await fetch(
  `https://api.faqcraft.com/faq_websites/${websiteId}/faq_categories/${categoryId}`,
  {
    headers: {
      'Authorization': 'Bearer ' + yourToken
    }
  }
);

const category = await response.json();
console.log('Category:', category.title);
# Get a single category
import requests

website_id = 'your-website-uuid'
category_id = 'your-category-uuid'
headers = {
    'Authorization': f'Bearer {your_token}'
}

response = requests.get(
    f'https://api.faqcraft.com/faq_websites/{website_id}/faq_categories/{category_id}',
    headers=headers
)

category = response.json()
print(f"Category: {category['title']}")
// Example not available
# Example not available
// Example not available

Create category

Creates a new category for a given FAQ website.

POST https://api.faqcraft.com/faq_websites/:website_id/faq_categories

Headers

Name Type Value
Authorization Required STRING Bearer $TOKEN
Content-Type Required STRING application/json

Response body

{
  "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.

PATCH https://api.faqcraft.com/faq_websites/:website_id/faq_categories/:id

Headers

Name Type Value
Authorization Required STRING Bearer $TOKEN
Content-Type Required STRING application/json

Body parameters

Name Type Description
title STRING Category title.
slug STRING URL slug. Unchanged when omitted; lowercase letters, digits and hyphens.
description STRING Short description shown on the help center.
display_order INTEGER Position among the website's categories, 0 or higher.

Response body

{
  "id": "uuid",
  "faq_website_id": "uuid",
  "title": "Getting Started",
  "slug": "getting-started",
  "description": "Everything you need to know to get started",
  "display_order": 2,
  "subcategories_count": 2,
  "articles_count": 8,
  "created_at": "2024-01-15T10:00:00Z",
  "updated_at": "2024-01-16T08:00:00Z"
}

Code examples

curl -X PATCH "https://api.faqcraft.com/faq_websites/website-uuid/faq_categories/category-uuid" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Getting Started",
    "display_order": 2
  }'
// Update a category
const websiteId = 'your-website-uuid';
const categoryId = 'your-category-uuid';
const response = await fetch(
  `https://api.faqcraft.com/faq_websites/${websiteId}/faq_categories/${categoryId}`,
  {
    method: 'PATCH',
    headers: {
      'Authorization': 'Bearer ' + yourToken,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      title: 'Getting Started',
      display_order: 2
    })
  }
);

const category = await response.json();
console.log('Updated:', category.title);
# Update a category
import requests

website_id = 'your-website-uuid'
category_id = 'your-category-uuid'
headers = {
    'Authorization': f'Bearer {your_token}',
    'Content-Type': 'application/json'
}

data = {
    'title': 'Getting Started',
    'display_order': 2
}

response = requests.patch(
    f'https://api.faqcraft.com/faq_websites/{website_id}/faq_categories/{category_id}',
    headers=headers,
    json=data
)

category = response.json()
print(f"Updated: {category['title']}")
// Example not available
# Example not available
// Example not available

Delete category

Deletes a category from a FAQ website.

DELETE https://api.faqcraft.com/faq_websites/:website_id/faq_categories/:id

Headers

Name Type Value
Authorization Required STRING Bearer $TOKEN

Response body

HTTP 200 OK (empty body)

Code examples

curl -X DELETE "https://api.faqcraft.com/faq_websites/website-uuid/faq_categories/category-uuid" \
  -H "Authorization: Bearer $TOKEN"
// Delete a category
const websiteId = 'your-website-uuid';
const categoryId = 'your-category-uuid';
const response = await fetch(
  `https://api.faqcraft.com/faq_websites/${websiteId}/faq_categories/${categoryId}`,
  {
    method: 'DELETE',
    headers: {
      'Authorization': 'Bearer ' + yourToken
    }
  }
);

if (response.ok) {
  console.log('Category deleted successfully');
}
# Delete a category
import requests

website_id = 'your-website-uuid'
category_id = 'your-category-uuid'
headers = {
    'Authorization': f'Bearer {your_token}'
}

response = requests.delete(
    f'https://api.faqcraft.com/faq_websites/{website_id}/faq_categories/{category_id}',
    headers=headers
)

if response.ok:
    print('Category deleted successfully')
// Example not available
# Delete a category
require 'net/http'
require 'uri'

website_id = 'your-website-uuid'
category_id = 'your-category-uuid'
uri = URI("https://api.faqcraft.com/faq_websites/#{website_id}/faq_categories/#{category_id}")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(uri)
request['Authorization'] = "Bearer #{your_token}"

response = http.request(request)
puts 'Category deleted successfully' if response.code == '200'
// Example not available

Subcategories

List subcategories

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.

GET https://api.faqcraft.com/faq_websites/:website_id/faq_categories/:category_id/faq_subcategories

Headers

Name Type Value
Authorization Required STRING Bearer $TOKEN

Response body

[
  {
    "id": "uuid",
    "faq_category_id": "uuid",
    "title": "Basics",
    "slug": "basics",
    "description": "The first steps after signing up",
    "display_order": 1,
    "articles_count": 4,
    "created_at": "2024-01-15T10:00:00Z",
    "updated_at": "2024-01-15T10:00:00Z"
  }
]

Code examples

curl -X GET "https://api.faqcraft.com/faq_websites/website-uuid/faq_categories/category-uuid/faq_subcategories" \
  -H "Authorization: Bearer $TOKEN"
// List subcategories of a category
const websiteId = 'your-website-uuid';
const categoryId = 'your-category-uuid';
const response = await fetch(
  `https://api.faqcraft.com/faq_websites/${websiteId}/faq_categories/${categoryId}/faq_subcategories`,
  {
    headers: {
      'Authorization': 'Bearer ' + yourToken
    }
  }
);

const subcategories = await response.json();
console.log('Total subcategories:', subcategories.length);
# List subcategories of a category
import requests

website_id = 'your-website-uuid'
category_id = 'your-category-uuid'
headers = {
    'Authorization': f'Bearer {your_token}'
}

response = requests.get(
    f'https://api.faqcraft.com/faq_websites/{website_id}/faq_categories/{category_id}/faq_subcategories',
    headers=headers
)

subcategories = response.json()
print(f"Total subcategories: {len(subcategories)}")
// Example not available
# Example not available
// Example not available

Get subcategory

Returns a single subcategory with its article count.

GET https://api.faqcraft.com/faq_websites/:website_id/faq_categories/:category_id/faq_subcategories/:id

Headers

Name Type Value
Authorization Required STRING Bearer $TOKEN

Response body

{
  "id": "uuid",
  "faq_category_id": "uuid",
  "title": "Basics",
  "slug": "basics",
  "description": "The first steps after signing up",
  "display_order": 1,
  "articles_count": 4,
  "created_at": "2024-01-15T10:00:00Z",
  "updated_at": "2024-01-15T10:00:00Z"
}

Code examples

curl -X GET "https://api.faqcraft.com/faq_websites/website-uuid/faq_categories/category-uuid/faq_subcategories/subcategory-uuid" \
  -H "Authorization: Bearer $TOKEN"
// Get a single subcategory
const websiteId = 'your-website-uuid';
const categoryId = 'your-category-uuid';
const subcategoryId = 'your-subcategory-uuid';
const response = await fetch(
  `https://api.faqcraft.com/faq_websites/${websiteId}/faq_categories/${categoryId}/faq_subcategories/${subcategoryId}`,
  {
    headers: {
      'Authorization': 'Bearer ' + yourToken
    }
  }
);

const subcategory = await response.json();
console.log('Subcategory:', subcategory.title);
# Get a single subcategory
import requests

website_id = 'your-website-uuid'
category_id = 'your-category-uuid'
subcategory_id = 'your-subcategory-uuid'
headers = {
    'Authorization': f'Bearer {your_token}'
}

response = requests.get(
    f'https://api.faqcraft.com/faq_websites/{website_id}/faq_categories/{category_id}/faq_subcategories/{subcategory_id}',
    headers=headers
)

subcategory = response.json()
print(f"Subcategory: {subcategory['title']}")
// Example not available
# Example not available
// Example not available

Create subcategory

Creates a subcategory inside a category. The slug is generated from the title unless you send one.

POST https://api.faqcraft.com/faq_websites/:website_id/faq_categories/:category_id/faq_subcategories

Headers

Name Type Value
Authorization Required STRING Bearer $TOKEN
Content-Type Required STRING application/json

Body parameters

Name Type Description
title Required STRING Subcategory title.
slug STRING URL slug. Generated from the title when omitted; unique within the category.
description STRING Short description shown on the help center.
display_order INTEGER Position within the category, 0 or higher.

Response body

{
  "id": "uuid",
  "faq_category_id": "uuid",
  "title": "Basics",
  "slug": "basics",
  "description": "The first steps after signing up",
  "display_order": 1,
  "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/category-uuid/faq_subcategories" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Basics",
    "description": "The first steps after signing up"
  }'
// Create a subcategory
const websiteId = 'your-website-uuid';
const categoryId = 'your-category-uuid';
const response = await fetch(
  `https://api.faqcraft.com/faq_websites/${websiteId}/faq_categories/${categoryId}/faq_subcategories`,
  {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer ' + yourToken,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      title: 'Basics',
      description: 'The first steps after signing up'
    })
  }
);

const subcategory = await response.json();
console.log('Created subcategory:', subcategory.id);
# Create a subcategory
import requests

website_id = 'your-website-uuid'
category_id = 'your-category-uuid'
headers = {
    'Authorization': f'Bearer {your_token}',
    'Content-Type': 'application/json'
}

data = {
    'title': 'Basics',
    'description': 'The first steps after signing up'
}

response = requests.post(
    f'https://api.faqcraft.com/faq_websites/{website_id}/faq_categories/{category_id}/faq_subcategories',
    headers=headers,
    json=data
)

subcategory = response.json()
print(f"Created subcategory: {subcategory['id']}")
// Example not available
# Example not available
// Example not available

Update subcategory

Updates a subcategory. Send only the fields you want to change.

PATCH https://api.faqcraft.com/faq_websites/:website_id/faq_categories/:category_id/faq_subcategories/:id

Headers

Name Type Value
Authorization Required STRING Bearer $TOKEN
Content-Type Required STRING application/json

Body parameters

Name Type Description
title STRING Subcategory title.
slug STRING URL slug. Unchanged when omitted; unique within the category.
description STRING Short description shown on the help center.
display_order INTEGER Position within the category, 0 or higher.

Response body

{
  "id": "uuid",
  "faq_category_id": "uuid",
  "title": "Basics",
  "slug": "basics",
  "description": "The first steps after signing up",
  "display_order": 2,
  "articles_count": 4,
  "created_at": "2024-01-15T10:00:00Z",
  "updated_at": "2024-01-16T08:00:00Z"
}

Code examples

curl -X PATCH "https://api.faqcraft.com/faq_websites/website-uuid/faq_categories/category-uuid/faq_subcategories/subcategory-uuid" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Basics",
    "display_order": 2
  }'
// Update a subcategory
const websiteId = 'your-website-uuid';
const categoryId = 'your-category-uuid';
const subcategoryId = 'your-subcategory-uuid';
const response = await fetch(
  `https://api.faqcraft.com/faq_websites/${websiteId}/faq_categories/${categoryId}/faq_subcategories/${subcategoryId}`,
  {
    method: 'PATCH',
    headers: {
      'Authorization': 'Bearer ' + yourToken,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      title: 'Basics',
      display_order: 2
    })
  }
);

const subcategory = await response.json();
console.log('Updated:', subcategory.title);
# Update a subcategory
import requests

website_id = 'your-website-uuid'
category_id = 'your-category-uuid'
subcategory_id = 'your-subcategory-uuid'
headers = {
    'Authorization': f'Bearer {your_token}',
    'Content-Type': 'application/json'
}

data = {
    'title': 'Basics',
    'display_order': 2
}

response = requests.patch(
    f'https://api.faqcraft.com/faq_websites/{website_id}/faq_categories/{category_id}/faq_subcategories/{subcategory_id}',
    headers=headers,
    json=data
)

subcategory = response.json()
print(f"Updated: {subcategory['title']}")
// Example not available
# Example not available
// Example not available

Delete subcategory

Soft deletes a subcategory. Its articles disappear from the help center and from article lists.

DELETE https://api.faqcraft.com/faq_websites/:website_id/faq_categories/:category_id/faq_subcategories/:id

Headers

Name Type Value
Authorization Required STRING Bearer $TOKEN

Response body

HTTP 200 OK (empty body)

Code examples

curl -X DELETE "https://api.faqcraft.com/faq_websites/website-uuid/faq_categories/category-uuid/faq_subcategories/subcategory-uuid" \
  -H "Authorization: Bearer $TOKEN"
// Delete a subcategory
const websiteId = 'your-website-uuid';
const categoryId = 'your-category-uuid';
const subcategoryId = 'your-subcategory-uuid';
const response = await fetch(
  `https://api.faqcraft.com/faq_websites/${websiteId}/faq_categories/${categoryId}/faq_subcategories/${subcategoryId}`,
  {
    method: 'DELETE',
    headers: {
      'Authorization': 'Bearer ' + yourToken
    }
  }
);

if (response.ok) {
  console.log('Subcategory deleted successfully');
}
# Delete a subcategory
import requests

website_id = 'your-website-uuid'
category_id = 'your-category-uuid'
subcategory_id = 'your-subcategory-uuid'
headers = {
    'Authorization': f'Bearer {your_token}'
}

response = requests.delete(
    f'https://api.faqcraft.com/faq_websites/{website_id}/faq_categories/{category_id}/faq_subcategories/{subcategory_id}',
    headers=headers
)

if response.ok:
    print('Subcategory deleted successfully')
// Example not available
# Example not available
// Example not available

Articles

List articles

Returns all articles for a given FAQ website.

GET https://api.faqcraft.com/faq_websites/:website_id/faq_articles

Headers

Name Type Value
Authorization Required STRING Bearer $TOKEN

Response body

[
  {
    "id": "uuid",
    "faq_subcategory_id": "uuid",
    "title": "How to get started",
    "slug": "how-to-get-started",
    "content": "# Getting Started\n\nWelcome to our FAQ...",
    "status": "published",
    "published_at": "2024-01-15T10:00:00Z",
    "published_by": {
      "id": "uuid",
      "name": "John Doe",
      "email": "user@example.com"
    },
    "category": { "id": "uuid", "title": "Getting Started", "slug": "getting-started" },
    "subcategory": { "id": "uuid", "title": "Basics", "slug": "basics" },
    "created_at": "2024-01-15T10:00:00Z",
    "updated_at": "2024-01-15T10:00:00Z"
  }
]

Code examples

curl -X GET "https://api.faqcraft.com/faq_websites/website-uuid/faq_articles" \
  -H "Authorization: Bearer $TOKEN"
// List all articles for a website
const websiteId = 'your-website-uuid';
const response = await fetch(
  `https://api.faqcraft.com/faq_websites/${websiteId}/faq_articles`,
  {
    headers: {
      'Authorization': 'Bearer ' + yourToken
    }
  }
);

const articles = await response.json();
console.log('Total articles:', articles.length);
# List all articles for a website
import requests

website_id = 'your-website-uuid'
headers = {
    'Authorization': f'Bearer {your_token}'
}

response = requests.get(
    f'https://api.faqcraft.com/faq_websites/{website_id}/faq_articles',
    headers=headers
)

articles = response.json()
print(f"Total articles: {len(articles)}")
// Example not available
# List all articles for a website
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::Get.new(uri)
request['Authorization'] = "Bearer #{your_token}"

response = http.request(request)
articles = JSON.parse(response.body)
puts "Total articles: #{articles.length}"
// Example not available

Get article

Returns a single article, including drafts, with its category, subcategory and publisher.

GET https://api.faqcraft.com/faq_websites/:website_id/faq_articles/:id

Headers

Name Type Value
Authorization Required STRING Bearer $TOKEN

Response body

{
  "id": "uuid",
  "faq_subcategory_id": "uuid",
  "title": "How to get started",
  "slug": "how-to-get-started",
  "content": "# Getting Started\n\nWelcome to our FAQ...",
  "status": "published",
  "published_at": "2024-01-16T09:00:00Z",
  "published_by": {
    "id": "uuid",
    "name": "John Doe",
    "email": "user@example.com"
  },
  "category": { "id": "uuid", "title": "Getting Started", "slug": "getting-started" },
  "subcategory": { "id": "uuid", "title": "Basics", "slug": "basics" },
  "created_at": "2024-01-15T10:00:00Z",
  "updated_at": "2024-01-16T09:00:00Z"
}

Code examples

curl -X GET "https://api.faqcraft.com/faq_websites/website-uuid/faq_articles/article-uuid" \
  -H "Authorization: Bearer $TOKEN"
// Get a single article
const websiteId = 'your-website-uuid';
const articleId = 'your-article-uuid';
const response = await fetch(
  `https://api.faqcraft.com/faq_websites/${websiteId}/faq_articles/${articleId}`,
  {
    headers: {
      'Authorization': 'Bearer ' + yourToken
    }
  }
);

const article = await response.json();
console.log('Article:', article.title, article.status);
# Get a single article
import requests

website_id = 'your-website-uuid'
article_id = 'your-article-uuid'
headers = {
    'Authorization': f'Bearer {your_token}'
}

response = requests.get(
    f'https://api.faqcraft.com/faq_websites/{website_id}/faq_articles/{article_id}',
    headers=headers
)

article = response.json()
print(f"Article: {article['title']} ({article['status']})")
// Example not available
# Example not available
// Example not available

Create 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.

POST https://api.faqcraft.com/faq_websites/:website_id/faq_articles

Headers

Name Type Value
Authorization Required STRING Bearer $TOKEN
Content-Type Required STRING application/json

Body parameters

Name Type Description
faq_subcategory_id Required UUID The subcategory the article belongs to.
title Required STRING Article title.
content STRING Article body in Markdown.
slug STRING URL slug. Generated from the title when omitted; unique within the subcategory.
status STRING draft (default) or published.

Response body

{
  "id": "uuid",
  "faq_subcategory_id": "uuid",
  "title": "How to get started",
  "slug": "how-to-get-started",
  "content": "# Getting Started\n\nWelcome to our FAQ...",
  "status": "draft",
  "published_at": null,
  "published_by": null,
  "category": { "id": "uuid", "title": "Getting Started", "slug": "getting-started" },
  "subcategory": { "id": "uuid", "title": "Basics", "slug": "basics" },
  "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_articles" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "How to get started",
    "content": "# Getting Started\n\nWelcome to our FAQ...",
    "faq_subcategory_id": "subcategory-uuid",
    "status": "draft"
  }'
// Create a new article
const websiteId = 'your-website-uuid';
const response = await fetch(
  `https://api.faqcraft.com/faq_websites/${websiteId}/faq_articles`,
  {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer ' + yourToken,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      title: 'How to get started',
      content: '# Getting Started\n\nWelcome to our FAQ...',
      faq_subcategory_id: 'subcategory-uuid',
      status: 'draft'
    })
  }
);

const article = await response.json();
console.log('Created article:', article.slug);
# 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.

PATCH https://api.faqcraft.com/faq_websites/:website_id/faq_articles/:id

Headers

Name Type Value
Authorization Required STRING Bearer $TOKEN
Content-Type Required STRING application/json

Body parameters

Name Type Description
title STRING Article title.
content STRING Article body in Markdown.
slug STRING URL slug. Unchanged when omitted; unique within the subcategory.
status STRING draft or published.
faq_subcategory_id UUID Moves the article to another subcategory.

Response body

{
  "id": "uuid",
  "faq_subcategory_id": "uuid",
  "title": "How to get started",
  "slug": "how-to-get-started",
  "content": "# Getting Started\n\nUpdated content...",
  "status": "published",
  "published_at": "2024-01-16T09:00:00Z",
  "published_by": {
    "id": "uuid",
    "name": "John Doe",
    "email": "user@example.com"
  },
  "category": { "id": "uuid", "title": "Getting Started", "slug": "getting-started" },
  "subcategory": { "id": "uuid", "title": "Basics", "slug": "basics" },
  "created_at": "2024-01-15T10:00:00Z",
  "updated_at": "2024-01-16T09:00:00Z"
}

Code examples

curl -X PATCH "https://api.faqcraft.com/faq_websites/website-uuid/faq_articles/article-uuid" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "published"
  }'
// Update an article
const websiteId = 'your-website-uuid';
const articleId = 'your-article-uuid';
const response = await fetch(
  `https://api.faqcraft.com/faq_websites/${websiteId}/faq_articles/${articleId}`,
  {
    method: 'PATCH',
    headers: {
      'Authorization': 'Bearer ' + yourToken,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      status: 'published'
    })
  }
);

const article = await response.json();
console.log('Published at:', article.published_at);
# Update an article
import requests

website_id = 'your-website-uuid'
article_id = 'your-article-uuid'
headers = {
    'Authorization': f'Bearer {your_token}',
    'Content-Type': 'application/json'
}

data = {
    'status': 'published'
}

response = requests.patch(
    f'https://api.faqcraft.com/faq_websites/{website_id}/faq_articles/{article_id}',
    headers=headers,
    json=data
)

article = response.json()
print(f"Published at: {article['published_at']}")
// Example not available
# Update an article
require 'net/http'
require 'json'
require 'uri'

website_id = 'your-website-uuid'
article_id = 'your-article-uuid'
uri = URI("https://api.faqcraft.com/faq_websites/#{website_id}/faq_articles/#{article_id}")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(uri)
request['Authorization'] = "Bearer #{your_token}"
request['Content-Type'] = 'application/json'
request.body = { status: 'published' }.to_json

response = http.request(request)
article = JSON.parse(response.body)
puts "Published at: #{article['published_at']}"
// Example not available

Approve articles

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.

POST https://api.faqcraft.com/faq_websites/:website_id/faq_articles/approve

Headers

Name Type Value
Authorization Required STRING Bearer $TOKEN
Content-Type Required STRING application/json

Body parameters

Name Type Description
article_ids Required UUID[] IDs of articles on this website. Every ID must exist, or nothing changes and the API answers 404.

Response body

[
  {
    "id": "uuid",
    "faq_subcategory_id": "uuid",
    "title": "How to get started",
    "slug": "how-to-get-started",
    "content": "# Getting Started\n\nWelcome to our FAQ...",
    "status": "published",
    "published_at": "2024-01-16T09:00:00Z",
    "published_by": {
      "id": "uuid",
      "name": "John Doe",
      "email": "user@example.com"
    },
    "category": { "id": "uuid", "title": "Getting Started", "slug": "getting-started" },
    "subcategory": { "id": "uuid", "title": "Basics", "slug": "basics" },
    "created_at": "2024-01-15T10:00:00Z",
    "updated_at": "2024-01-16T09:00:00Z"
  }
]

Code examples

curl -X POST "https://api.faqcraft.com/faq_websites/website-uuid/faq_articles/approve" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "article_ids": [
      "article-uuid-1",
      "article-uuid-2"
    ]
  }'
// Publish a batch of draft articles
const websiteId = 'your-website-uuid';
const response = await fetch(
  `https://api.faqcraft.com/faq_websites/${websiteId}/faq_articles/approve`,
  {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer ' + yourToken,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      article_ids: ['article-uuid-1', 'article-uuid-2']
    })
  }
);

const articles = await response.json();
console.log('Published:', articles.length);
# Publish a batch of draft articles
import requests

website_id = 'your-website-uuid'
headers = {
    'Authorization': f'Bearer {your_token}',
    'Content-Type': 'application/json'
}

data = {
    'article_ids': ['article-uuid-1', 'article-uuid-2']
}

response = requests.post(
    f'https://api.faqcraft.com/faq_websites/{website_id}/faq_articles/approve',
    headers=headers,
    json=data
)

articles = response.json()
print(f"Published: {len(articles)}")
// Example not available
# Example not available
// Example not available

Reject articles

Rejects a batch of articles by soft deleting them, the same as Delete article for each one. Returns the IDs that were rejected.

POST https://api.faqcraft.com/faq_websites/:website_id/faq_articles/reject

Headers

Name Type Value
Authorization Required STRING Bearer $TOKEN
Content-Type Required STRING application/json

Body parameters

Name Type Description
article_ids Required UUID[] IDs of articles on this website. Every ID must exist, or nothing changes and the API answers 404.

Response body

{
  "rejected": ["article-uuid-1", "article-uuid-2"]
}

Code examples

curl -X POST "https://api.faqcraft.com/faq_websites/website-uuid/faq_articles/reject" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "article_ids": [
      "article-uuid-1",
      "article-uuid-2"
    ]
  }'
// Reject a batch of draft articles
const websiteId = 'your-website-uuid';
const response = await fetch(
  `https://api.faqcraft.com/faq_websites/${websiteId}/faq_articles/reject`,
  {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer ' + yourToken,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      article_ids: ['article-uuid-1', 'article-uuid-2']
    })
  }
);

const { rejected } = await response.json();
console.log('Rejected:', rejected.length);
# Reject a batch of draft articles
import requests

website_id = 'your-website-uuid'
headers = {
    'Authorization': f'Bearer {your_token}',
    'Content-Type': 'application/json'
}

data = {
    'article_ids': ['article-uuid-1', 'article-uuid-2']
}

response = requests.post(
    f'https://api.faqcraft.com/faq_websites/{website_id}/faq_articles/reject',
    headers=headers,
    json=data
)

rejected = response.json()['rejected']
print(f"Rejected: {len(rejected)}")
// Example not available
# Example not available
// Example not available

Upload article image

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 ![Settings page](https://api.faqcraft.com/uploads/...).

POST https://api.faqcraft.com/faq_websites/:website_id/faq_articles/:id/images

Headers

Name Type Value
Authorization Required STRING Bearer $TOKEN

Body parameters

Name Type Description
image Required FILE PNG, JPG or SVG image, 2 MB at most, sent as multipart/form-data.

Response body

{
  "url": "/uploads/faq/articles/website-uuid/article-uuid/image-uuid.png"
}

Code examples

curl -X POST "https://api.faqcraft.com/faq_websites/website-uuid/faq_articles/article-uuid/images" \
  -H "Authorization: Bearer $TOKEN" \
  -F "image=@screenshot.png"
// Upload an image for an article
const websiteId = 'your-website-uuid';
const articleId = 'your-article-uuid';
const form = new FormData();
form.append('image', fileInput.files[0]);
const response = await fetch(
  `https://api.faqcraft.com/faq_websites/${websiteId}/faq_articles/${articleId}/images`,
  {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer ' + yourToken
    },
    body: form
  }
);

const { url } = await response.json();
console.log('Image URL:', url);
# Upload an image for an article
import requests

website_id = 'your-website-uuid'
article_id = 'your-article-uuid'
headers = {
    'Authorization': f'Bearer {your_token}'
}

files = {'image': open('screenshot.png', 'rb')}

response = requests.post(
    f'https://api.faqcraft.com/faq_websites/{website_id}/faq_articles/{article_id}/images',
    headers=headers,
    files=files
)

url = response.json()['url']
print(f"Image URL: {url}")
// Example not available
# Example not available
// Example not available

Delete article

Deletes an article from a FAQ website.

DELETE https://api.faqcraft.com/faq_websites/:website_id/faq_articles/:id

Headers

Name Type Value
Authorization Required STRING Bearer $TOKEN

Response body

HTTP 200 OK (empty body)

Code examples

curl -X DELETE "https://api.faqcraft.com/faq_websites/website-uuid/faq_articles/article-uuid" \
  -H "Authorization: Bearer $TOKEN"
// Delete an article
const websiteId = 'your-website-uuid';
const articleId = 'your-article-uuid';
const response = await fetch(
  `https://api.faqcraft.com/faq_websites/${websiteId}/faq_articles/${articleId}`,
  {
    method: 'DELETE',
    headers: {
      'Authorization': 'Bearer ' + yourToken
    }
  }
);

if (response.ok) {
  console.log('Article deleted successfully');
}
# Delete an article
import requests

website_id = 'your-website-uuid'
article_id = 'your-article-uuid'
headers = {
    'Authorization': f'Bearer {your_token}'
}

response = requests.delete(
    f'https://api.faqcraft.com/faq_websites/{website_id}/faq_articles/{article_id}',
    headers=headers
)

if response.ok:
    print('Article deleted successfully')
// Example not available
# Delete an article
require 'net/http'
require 'uri'

website_id = 'your-website-uuid'
article_id = 'your-article-uuid'
uri = URI("https://api.faqcraft.com/faq_websites/#{website_id}/faq_articles/#{article_id}")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(uri)
request['Authorization'] = "Bearer #{your_token}"

response = http.request(request)
puts 'Article deleted successfully' if response.code == '200'
// Example not available

Public Endpoints

Get public FAQ site

Returns the public FAQ site info and its categories. The :domain is the website's FAQCraft domain or its custom domain. No authentication required.

GET https://api.faqcraft.com/public/faq/:domain

Headers

Name Type Value

Response body

{
  "id": "uuid",
  "title": "Help Center",
  "domain": "help-center",
  "custom_domain": "help.example.com",
  "logo_url": null,
  "header_links": [{"label": "Home", "url": "https://example.com"}],
  "footer_links": [],
  "powered_by_faqcraft": true,
  "categories_count": 1,
  "categories": [
    {
      "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"
// Get public FAQ site info (no authentication required)
const domain = 'help.example.com';
const response = await fetch(
  `https://api.faqcraft.com/public/faq/${domain}`
);

const website = await response.json();
console.log('Website:', website.title);
console.log('Categories:', website.categories.length);
# Get public FAQ site info (no authentication required)
import requests

domain = 'help.example.com'

response = requests.get(
    f'https://api.faqcraft.com/public/faq/{domain}'
)

website = response.json()
print(f"Website: {website['title']}")
print(f"Categories: {len(website['categories'])}")
// Example not available
# Get public FAQ site info (no authentication required)
require 'net/http'
require 'json'
require 'uri'

domain = 'help.example.com'
uri = URI("https://api.faqcraft.com/public/faq/#{domain}")
response = Net::HTTP.get_response(uri)

website = JSON.parse(response.body)
puts "Website: #{website['title']}"
puts "Categories: #{website['categories'].length}"
// Example not available

List public categories

Returns the website's categories, ordered by display_order. articles_count counts published articles only. No authentication required.

GET https://api.faqcraft.com/public/faq/:domain/categories

Headers

Name Type Value

Response body

[
  {
    "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.

GET https://api.faqcraft.com/public/faq/:domain/categories/:slug

Headers

Name Type Value

Response body

{
  "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.

GET https://api.faqcraft.com/public/faq/:domain/categories/:category_slug/subcategories/:slug

Headers

Name Type Value

Response body

{
  "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" },
  "articles": [
    {
      "id": "uuid",
      "title": "How to get started",
      "slug": "how-to-get-started",
      "content": "# Getting Started\n\nWelcome to our FAQ...",
      "published_at": "2024-01-16T09:00:00Z",
      "category": { "id": "uuid", "title": "Getting Started", "slug": "getting-started" },
      "subcategory": { "id": "uuid", "title": "Basics", "slug": "basics" }
    }
  ]
}

Code examples

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.

GET https://api.faqcraft.com/public/faq/:domain/articles/:category_slug/:subcategory_slug/:article_slug

Headers

Name Type Value

Response body

{
  "id": "uuid",
  "title": "How to get started",
  "slug": "how-to-get-started",
  "content": "# Getting Started\n\nWelcome to our FAQ...",
  "published_at": "2024-01-16T09:00:00Z",
  "category": { "id": "uuid", "title": "Getting Started", "slug": "getting-started" },
  "subcategory": { "id": "uuid", "title": "Basics", "slug": "basics" },
  "related_articles": [
    { "id": "uuid", "title": "Inviting your team", "slug": "inviting-your-team" }
  ]
}

Code examples

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.

GET https://api.faqcraft.com/public/faq/:domain/search

Query parameters

Name Type Description
q STRING The search query string

Headers

Name Type Value

Response body

{
  "results": [
    {
      "id": "uuid",
      "title": "How to reset your password",
      "slug": "how-to-reset-your-password",
      "excerpt": "You can reset your password by clicking the forgot password link...",
      "published_at": "2024-01-15T10:00:00Z",
      "path": "/articles/account/security/how-to-reset-your-password",
      "category": { "id": "uuid", "title": "Account", "slug": "account" },
      "subcategory": { "id": "uuid", "title": "Security", "slug": "security" }
    }
  ]
}

Code examples

curl -X GET "https://api.faqcraft.com/public/faq/help.example.com/search?q=reset+password"
// Search public FAQ articles (no authentication required)
const domain = 'help.example.com';
const query = 'reset password';
const response = await fetch(
  `https://api.faqcraft.com/public/faq/${domain}/search?q=${encodeURIComponent(query)}`
);

const { results } = await response.json();
console.log('Search results:', results.length);
results.forEach(r => console.log(r.title));
# Search public FAQ articles (no authentication required)
import requests

domain = 'help.example.com'
params = {'q': 'reset password'}

response = requests.get(
    f'https://api.faqcraft.com/public/faq/{domain}/search',
    params=params
)

results = response.json()['results']
print(f"Search results: {len(results)}")
for r in results:
    print(r['title'])
// Example not available
# Search public FAQ articles (no authentication required)
require 'net/http'
require 'json'
require 'uri'

domain = 'help.example.com'
uri = URI("https://api.faqcraft.com/public/faq/#{domain}/search")
uri.query = URI.encode_www_form(q: 'reset password')
response = Net::HTTP.get_response(uri)

results = JSON.parse(response.body)['results']
puts "Search results: #{results.length}"
results.each { |r| puts r['title'] }
// Example not available

Submit article feedback

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.

POST https://api.faqcraft.com/public/faq/:domain/feedback

Headers

Name Type Value
Content-Type Required STRING application/json

Body parameters

Name Type Description
article_id Required UUID The ID of a published article on this website.
rating Required STRING One of good, neutral or bad.
message STRING Optional free-text comment.

Response body

{
  "id": "uuid",
  "rating": "good",
  "created_at": "2024-01-15T10:00:00Z"
}

Code examples

curl -X POST "https://api.faqcraft.com/public/faq/help.example.com/feedback" \
  -H "Content-Type: application/json" \
  -d '{
    "article_id": "article-uuid",
    "rating": "good",
    "message": "Very helpful, thank you!"
  }'
// Submit article feedback (no authentication required)
const domain = 'help.example.com';
const response = await fetch(
  `https://api.faqcraft.com/public/faq/${domain}/feedback`,
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      article_id: 'article-uuid',
      rating: 'good',
      message: 'Very helpful, thank you!'
    })
  }
);

const feedback = await response.json();
console.log('Feedback recorded:', feedback.id);
# Submit article feedback (no authentication required)
import requests

domain = 'help.example.com'

data = {
    'article_id': 'article-uuid',
    'rating': 'good',
    'message': 'Very helpful, thank you!'
}

response = requests.post(
    f'https://api.faqcraft.com/public/faq/{domain}/feedback',
    json=data
)

feedback = response.json()
print(f"Feedback recorded: {feedback['id']}")
// Example not available
# Submit article feedback (no authentication required)
require 'net/http'
require 'json'
require 'uri'

domain = 'help.example.com'
uri = URI("https://api.faqcraft.com/public/faq/#{domain}/feedback")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = {
  article_id: 'article-uuid',
  rating: 'good',
  message: 'Very helpful, thank you!'
}.to_json

response = http.request(request)
feedback = JSON.parse(response.body)
puts "Feedback recorded: #{feedback['id']}"
// Example not available
What Google Analytics sets
Cookie What it does Kept for
_ga Tells one visit from another 2 years
_ga_* Remembers the current visit 2 years

Google may process this data in the US. We don't use it for ads and don't share it with anyone else. More in our privacy policy.

Can we use Google Analytics to see which pages help? Google sets two cookies. No ads.