API and webhooks
Connect your chatbot to your own app, CRM, phone system or workflow tool. The API is on the Business and Agency plans; Slack alerts work on every plan.
Authentication
Create a key under API in your dashboard and send it on every request. Keep it on your server; never put it in a web page.
Authorization: Bearer cfd_your_key
Limit: 120 requests a minute per account. Errors come back as JSON {"error": "..."} with a normal HTTP status (401 bad key, 403 plan, 404 not found, 429 slow down).
Endpoints
Base address: https://aichatfrontdesk.com/api/v1. :bot is the chatbot id from your install code (data-bot="...").
GET /botsPOST /botsPOST /bots/:bot/cloneDELETE /bots/:botGET /bots/:botPATCH /bots/:botGET /modelsGET /usagePOST /bots/:bot/chatPOST /bots/:bot/chat/streamGET /bots/:bot/conversations/searchGET /bots/:bot/conversationsGET /bots/:bot/conversations/:idGET /bots/:bot/leadsPOST /bots/:bot/sources/textPOST /bots/:bot/sources/qaGET /bots/:bot/sourcesDELETE /bots/:bot/sources/:idGET /bots/:bot/write-actionsPOST /bots/:bot/retrain
The full machine-readable description (OpenAPI 3.1) is at /docs/openapi.json.
Example: create a chatbot safely
curl -X POST https://aichatfrontdesk.com/api/v1/bots -H "Authorization: Bearer cfd_your_key" -H "Idempotency-Key: signup-8841-attempt-1" -H "Content-Type: application/json" -d '{"website":"https://example.com","name":"Example Plumbing"}'
{"id":"k3x9...","name":"Example Plumbing","website":"https://example.com/","status":"training"}
If the request times out, send it again with the same Idempotency-Key: you get the first result back (header Idempotent-Replay: true) and no second chatbot. Reusing a key for a different request returns 422. Keys are remembered for 24 hours. When your plan's chatbots are all used, create and clone return 403 with "code":"bot_limit". Deleting needs {"confirm":"delete"} and cannot be undone.
Example: ask a question
curl -X POST https://aichatfrontdesk.com/api/v1/bots/BOT_ID/chat -H "Authorization: Bearer cfd_your_key" -H "Content-Type: application/json" -d '{"message":"Are you open Saturday?"}'
{"conversation_id":"3f9a...","reply":"Yes, 8am to 2pm on Saturdays...","action":"none","sources":[{"title":"Hours","url":"https://..."}],"answered_by":"ai","limited":false}
Read-only MCP and command line
Business and Agency API keys can use POST /mcp/read from an MCP client. Authenticate with your API bearer key. Four read-only tools list your chatbots, source metadata and conversation metadata, or report current access. This stateless HTTP endpoint supports JSON responses, not streaming, OAuth or write tools. Rotate the API key in your dashboard to revoke access.
The repository includes a read-only Node CLI: node src/read-cli.js bots, bot ID, sources ID, conversations ID or usage. Supply CHAT_FRONT_DESK_API_KEY through your environment, never command-line arguments. Optional CHAT_FRONT_DESK_URL must be an HTTPS origin. It prints JSON, never follows redirects, and does not perform mutations, login or paid AI calls.
Pass the conversation_id back to continue the same conversation. AI answers use weighted reply credits, exactly like website chat: model weights are 1, 2, 4 or 5, and tools can add extra credits. If your replies run out, limited is true and the reply asks for contact details instead.
Webhooks (Zapier, Make, n8n, your CRM)
Paste any https address under Settings › Slack, Zapier and webhooks. New lead and handoff events are queued for delivery; availability, timing and retries depend on the endpoint and delivery settings:
POST your-address
Content-Type: application/json
X-Webhook-Timestamp: 1792512000
X-Webhook-Signature: sha256=HMAC_SHA256(secret, timestamp + "." + body)
{"event":"lead.created","created_at":"2026-10-20T15:04:05.000Z",
"chatbot":{"id":"BOT_ID","name":"Bluebonnet Ridge Plumbing","website":"https://example.com"},
"lead":{"id":"42","type":"booking","name":"Maria Gonzalez","phone":"+15125550199","email":"","wants":"Thursday morning","message":"Water heater leaking"},
"conversation_url":"https://aichatfrontdesk.com/app/conversations/...","page_url":"https://example.com/water-heaters"}
type is one of lead, booking, handoff, text, call. Your signing secret is shown next to the webhook box. In Zapier choose Webhooks by Zapier › Catch Hook, paste its address, then click Send a test lead.
Slack
Create an incoming webhook in Slack (Apps › Incoming Webhooks › Add to a channel) and paste it in Settings. Each lead posts a short message with a link to the conversation.