Skip to content

Integrations

Any system that can make an HTTP request can sync contacts into Whatbot. Here are the common paths.

Add an HTTP Request node:

  • Method POST
  • URL https://api.whatbot.in/public/v1/contacts
  • Header X-API-Key: wa_live_xxx
  • Body (JSON, array):
[{ "phone": "{{$json.phone}}", "name": "{{$json.name}}",
"attributes": { "city": "{{$json.city}}", "source": "{{$json.source}}" } }]

Trigger it from a form submission, a new CRM row, a schedule, or a webhook — every new/updated contact flows into Whatbot in real time.

A tiny webhook handler that forwards a contact whenever your system creates/updates one:

Node.js
import express from "express";
const app = express();
app.use(express.json());
app.post("/on-lead-change", async (req, res) => {
const lead = req.body;
await fetch("https://api.whatbot.in/public/v1/contacts", {
method: "POST",
headers: {
"X-API-Key": process.env.WHATBOT_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify([
{
phone: lead.phone,
name: lead.name,
tags: lead.tags,
attributes: { city: lead.city, source: lead.source, budget: lead.budget },
},
]),
});
res.sendStatus(200);
});
app.listen(3000);
Python
import csv, requests
with open("leads.csv") as f:
rows = list(csv.DictReader(f))
# batch to keep requests reasonable
for i in range(0, len(rows), 500):
batch = [
{"phone": r["phone"], "name": r.get("name"),
"attributes": {k: v for k, v in r.items() if k not in ("phone", "name")}}
for r in rows[i:i + 500]
]
resp = requests.post(
"https://api.whatbot.in/public/v1/contacts",
headers={"X-API-Key": "wa_live_xxx"},
json=batch, timeout=30,
)
resp.raise_for_status()
  • Retry on 5xx/429 with backoff — upserts are idempotent, so retries are safe.
  • Batch many contacts per request (one array) rather than one call each.
  • Normalize phones loosely — Whatbot handles formatting, but include the country code when you have it.