DOCUMENTATION

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

GET/api/features

Retrieve all published platform features, icons, and slug identifiers.

[
  {
    "slug": "ai-agent",
    "name": "AI Agent Assistant",
    "shortDescription": "Auto-replies using business docs..."
  }
]
GET/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..."]
}
GET/api/pricing

Fetch current BDT pricing structures, subscription plan titles, features, limits, and links.

GET/api/faqs?category=[category]

Fetch frequently asked questions, optionally filtered by category (general, technical, pricing, security).

GET/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"
    }
  ]
}
POST/api/contact

Submit 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."
}
POST/api/newsletter

Subscribe 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:

POST/api/admin/revalidate

Trigger 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"
}