API Reference Documentation
Complete documentation for public endpoints and admin webhooks.
API Design & Authentication
AutoZeniq offers developer APIs to query business features, manage FAQ databases, receive contact details, and trigger incremental static regeneration (ISR) on-demand caches.
Authentication: Public routes do not require any headers. Administrative routes require a validated NextAuth JWT token stored in cookies or passed via header authorization.
Public API Endpoints
/api/featuresRetrieve all published platform features, icons, and slug identifiers.
[
{
"slug": "ai-agent",
"name": "AI Agent Assistant",
"shortDescription": "Auto-replies using business docs..."
}
]/api/features/[slug]Retrieve details of a specific feature, including benefits, steps, and Q&As.
{
"slug": "ai-agent",
"name": "AI Agent Assistant",
"tagline": "Your 24/7 automated support employee.",
"desc": "AutoZeniq's AI Agent connects directly...",
"benefits": ["Instant response rate...", "Reads PDFs and FAQs..."]
}/api/pricingFetch current BDT pricing structures, subscription plan titles, features, limits, and links.
/api/faqs?category=[category]Fetch frequently asked questions, optionally filtered by category (general, technical, pricing, security).
/api/search?q=[keyword]Perform keyword searches across features, FAQs, and blog posts.
{
"results": [
{
"type": "feature",
"title": "AI Agent Assistant",
"description": "Auto-replies to customer queries...",
"url": "/features/ai-agent"
}
]
}/api/contactSubmit a support or demo inquiry. Auto-routes notification emails using the Resend API SDK.
Request Body:
{
"name": "Arif Rahman",
"email": "arif@acme.com",
"phone": "01712345678",
"business": "Acme E-commerce",
"plan": "growth",
"message": "We need Pathao courier integration details."
}/api/newsletterSubscribe email addresses to the marketing newsletter list.
Administrative Webhooks
For advanced CMS automation, the cache revalidation endpoint forces Next.js to purge ISR on-demand for specific page layouts:
/api/admin/revalidateTrigger on-demand page revalidation (e.g. when updating pricing tiers or FAQs in database).
Headers:
X-Revalidation-Secret: your-secret-token
Request Body:
{
"path": "/pricing"
}