MagicChat API for Zapier

The account API behind the MagicChat Zapier integration. It works from any HTTP client too: Make, n8n, scripts or your own backend.

Setting up Zapier without code? Read the step-by-step guide.

Authentication

Every request needs your account API key. Find or generate it in Dashboard → Account. It starts with mc-api-. Send it in the X-API-Key header. Generating a new key replaces the old one.

curl https://www.magicchat.ai/api/zapier/me \
  -H "X-API-Key: mc-api-…"

Errors

Errors return JSON { "error": "message" } with status 401 (missing or invalid key), 400 (bad input, unknown bot, plan limit or no message credits left), 404 (unknown endpoint) or 500 (retry later).

Endpoints

GET /api/zapier/me

The account the API key belongs to. Use it to check a key.

{ "email": "you@company.com", "plan": "pro", "bots": 3,
  "limits": { "chatbots": 10, "messages_per_month": 5000, "pages": 2000 },
  "messages_left_this_month": 4210 }

GET /api/zapier/bots

Bots on the account, newest first.

[ { "bot_id": "8f0c2b4e-…", "slug": "acme-support", "name": "Acme Support",
    "description": "", "is_active": true, "created_at": "2026-10-01T08:00:00Z",
    "dashboard_url": "https://www.magicchat.ai/dashboard/bots/acme-support",
    "chat_url": "https://www.magicchat.ai/c/acme-support" } ]

GET /api/zapier/leads

The 50 newest leads captured by bots' lead forms, newest first. Lead form fields are spread onto each item.

  • bot_id (query, optional): Only this bot. Omit for every bot on the account.
[ { "id": "3b9f6c2a-…", "name": "Jane Doe", "email": "jane@example.com",
    "bot_id": "8f0c2b4e-…", "bot_name": "Acme Support", "visitor_id": "v_12ab34cd",
    "captured_at": "2026-10-19T09:30:00Z" } ]

GET /api/zapier/questions

Up to 50 questions visitors asked in the last 7 days, newest first, each with the bot's reply. id is stable per question.

  • bot_id (query, optional): Only this bot. Omit for every bot on the account.
[ { "id": "chat_9a8b7c:0", "question": "Do you offer a free trial?",
    "answer": "Yes…", "chat_id": "chat_9a8b7c", "bot_id": "8f0c2b4e-…",
    "bot_name": "Acme Support", "chat_started_at": "2026-10-19T09:30:00Z" } ]

POST /api/zapier/ask

Ask a bot a question. Answers from the bot's knowledge, like the chat widget. Uses one message credit.

  • bot_id (body, required): The bot's bot_id or slug.
  • question (body, required): The question, in any language.
curl -X POST https://www.magicchat.ai/api/zapier/ask \
  -H "X-API-Key: mc-api-…" -H "Content-Type: application/json" \
  -d '{"bot_id":"…","question":"…"}'
{ "id": "c1d2e3f4-…", "bot_id": "8f0c2b4e-…", "bot_name": "Acme Support",
  "question": "Do you offer a free trial?", "answer": "Yes…",
  "grounded": true, "sources": ["https://acme.com/pricing"] }

POST /api/zapier/webpage

Read a public web page and add it to a bot's knowledge.

  • bot_id (body, required): The bot's bot_id or slug.
  • url (body, required): A full http(s) URL that loads without a login.
curl -X POST https://www.magicchat.ai/api/zapier/webpage \
  -H "X-API-Key: mc-api-…" -H "Content-Type: application/json" \
  -d '{"bot_id":"…","url":"…"}'
{ "bot": "Acme Support", "added": "https://acme.com/blog/new-feature",
  "source_id": "a7b8c9d0-…", "chunks": 12 }

POST /api/zapier/text

Add a piece of text (FAQ, policy, notes) to a bot's knowledge.

  • bot_id (body, required): The bot's bot_id or slug.
  • title (body, optional): Shown in the bot's source list.
  • content (body, required): 20 to 200,000 characters.
curl -X POST https://www.magicchat.ai/api/zapier/text \
  -H "X-API-Key: mc-api-…" -H "Content-Type: application/json" \
  -d '{"bot_id":"…","title":"…","content":"…"}'
{ "bot": "Acme Support", "added": "Refund policy", "source_id": "b1c2d3e4-…", "chunks": 3 }