APIs & WEBHOOKS FOR MOBLE CHATBOTS

This article breaks down APIs and Webhooks in plain English, then shows exactly where to plug things in on your MOBLE Chatbot (“AGENTS” → EDIT → Integrations). 

PREREQUISITE

If you’re new to automation, read this before building your first n8n workflow.

WHAT IS AN API?

API = Application Programming Interface. Think of it as a waiter between two systems. You send a request (e.g., “create a lead”), and you get a response (e.g., “lead created, here’s the ID”). In practice, APIs are just URLs you call with a method like GET (read), POST (create), PUT/PATCH (update), or DELETE (remove), plus optional headers and a JSON body.

Beginner’s cheat-sheet (you’ll use these everywhere):

  • GET — fetch data (read only).
  • POST — create something new.
  • PUT/PATCH — update an existing thing.
  • DELETE — remove a thing.

EXAMPLE: USING MOBLE’S API (READ-ONLY)

On your site, MOBLE exposes structured Knowledge Base and Data endpoints so Chatbots/Voicebots/automations can fetch your content. You’ll see these in AGENTS → EDIT → Integrations and in ADD KNOWLEDGE.

Knowledge Base JSON feeds (read with GET):

  • FAQhttps://m.moble.site/api/site/ai/json/faq
  • PAGEhttps://m.moble.site/api/site/ai/json/page
  • FILEhttps://m.moble.site/api/site/ai/json/file
  • BLOGhttps://m.moble.site/api/site/ai/json/blog
  • VOICEhttps://m.moble.site/api/site/ai/json/voice
  • PRODUCThttps://m.moble.site/api/site/ai/json/product

Operational API (read with GET):

  • ORDERSGET https://m.moble.site/api/site/orders
  • MEMBERSGET https://m.moble.site/api/site/members
  • ENQUIRIESGET https://m.moble.site/api/site/enquiries

Authentication: Use your site’s API key (shown as API KEY: ak_… in the UI). Send it as a header.

Example cURL (fetch FAQs):

curl -X GET \ "https://m.moble.site/api/site/ai/json/faq" \ -H "Authorization: Bearer ak_your_site_key_here" \ -H "Accept: application/json" 

Example n8n “HTTP Request” node (GET FAQs):

  • Method: GET
  • URL: https://m.moble.site/api/site/ai/json/faq
  • Authentication: None
  • Headers: Authorization: Bearer ak_your_site_key_here, Accept: application/json

When you Execute Node, you’ll get a JSON array you can Split Out and write into Data Tables/Sheets/your RAG store.

WHAT IS A WEBHOOK?

Webhook = your system’s way to receive data the moment something happens. Instead of you pulling data with GET, the other app pushes it to your URL. In n8n, that URL comes from the Webhook node; in MOBLE, you paste that URL in your Chatbot’s Integrations → Webhooks fields.

Where to paste Webhooks in MOBLE (AGENTS → EDIT → Integrations):

  • WEBHOOKS: Webhook / Webhook URL / Voicebot
  • n8n: Webhook URL
  • AgentBuilder: Webhook URL
  • Zapier: Webhook URL
  • Make: Webhook URL
  • Relevance AI: Webhook URL

Typical flow: Visitor chats → Chatbot collects fields → MOBLE POSTs the payload to your Webhook URL → your n8n workflow runs instantly.

Example payload from a MOBLE Chatbot (illustrative):

{ "source": "moble-chatbot", "agent": "Sales Lead Chatbot", "timestamp": "2025-10-14T04:10:00Z", "sessionId": "ch_9f3c...", "user": { "fullName": "Alex Morgan", "email": "alex@example.com", "phone": "+61 4 1234 5678" }, "message": "I'd like a quote for 200 units.", "context": { "intent": "quote_request", "pageUrl": "https://www.yoursite.com/products/widget-pro" } } 

Example n8n Webhook node (to receive MOBLE data):

  • HTTP Method: POST
  • Path: /moble/chatbot/enquiry (results in a full URL n8n gives you)
  • Response:Workflow received, thanks” (optionally add a Respond to Webhook node)

Where it goes in the MOBLE UI: paste the n8n Webhook URL into AGENTS → EDIT → Integrations → n8n: Webhook URL (or Webhook URL if you’re using the general slot). Save. From now on, new chats/forms will push straight into n8n.


EXAMPLE: BEGINNER n8n FLOW (MOBLE → n8n → CRM/SPIBoard)

  1. Webhook (n8n) — receives the Chatbot POST from MOBLE.
  2. If / Switch — route by intent (quote_request → Sales Lead; support → Ticket; project → Task).
  3. AI Node (optional) — summarise the enquiry and propose next action.
  4. HTTP Request (GET) — pull extra context from /api/site/ai/json/page if you need product/page metadata.
  5. Storage — write the record to Sheets/Data Tables; post to your CRM; mirror to SPIBoard (Status/Priority/Importance).
  6. Respond to Webhook — confirm receipt (used when the sender expects a quick 200 OK + message).

SECURITY & BEST PRACTICES

  • Never expose your API Key publicly. Store ak_… in n8n credentials (not hard-coded in nodes). Use the Authorization: Bearer … header.
  • Use Production vs Test URLs correctly. n8n Webhook nodes provide both. Keep MOBLE pointed at Production once live.
  • Validate input. In n8n, check required fields (email, intent, consent) before writing to systems.
  • Idempotency. Guard against duplicates (e.g., check if a lead with same email exists before creating another).
  • Log & alert. Add a final step to notify your team and store the raw payload for troubleshooting.


ADD KNOWLEDGE (MOBLE)

In ADD KNOWLEDGE (Main Menu), paste the JSON endpoints to feed your Chatbots/Voicebots and AI Agents with first-party content. This is perfect for RAG or pre-answer retrieval. Pair this with an n8n Schedule node to refresh your knowledge snapshots daily.

QUICK REFERENCE (COPY/PASTE)

n8n HTTP Request node to GET Members:

Method: GET URL: https://m.moble.site/api/site/members Headers: Authorization: Bearer ak_your_site_key_here Accept: application/json 

n8n Webhook URL placement in MOBLE:

  • AGENTS → EDIT → Integrations → paste your n8n URL under n8n: Webhook URL (or a general Webhook URL slot).

TL;DR

  • APIs = you pull/push data on demand (GET/POST/PUT/DELETE) — great for reading Knowledge JSON and syncing records.
  • Webhooks = apps push data to you in real time — perfect for instant Chatbot handovers into n8n.
  • MOBLE + n8n = paste your n8n Webhook URL in the Chatbot, then call MOBLE’s GET endpoints anywhere you need context.


Play before you Pay?

Brand an AI Website and Chatbot Theme in under 3 minutes, anyone can do it!!

GETTING AROUND

GET A QUOTE

A Web Builder for Design. A CMS for Business. We serve all businesses from SME's to Enterprise. Talk with us for AI development, custom website design, website development, ecommerce websites, directories, intranets and social networks.


PRIVACY | WEBSITE TERMS | PLATFORM TERMS | © 2025 MOBLE PTY LTD