Guides

Integrate your CRM

Sync leads both ways — push contacts in, and receive qualification events out.

Reply First connects to any CRM through two vendor-neutral surfaces: an inbound REST API to push leads in and write updates back, and an outbound webhook that notifies your system as leads move. Together they keep both sides in sync. Configure both at Settings → Integrations → Webhook (admin only).

The two directions

Push a lead in

Create an API token in settings, then POST the lead. It's recorded at stage new and picked up when the contact writes in — no message is sent.

curl https://replyfirst.ae/api/v1/leads \
  -H "Authorization: Bearer $RF_ORG_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Jane Buyer",
    "phone": "+971501234567",
    "profile": { "budget": "1.5M AED" },
    "external_ref": { "system": "my-crm", "id": "crm-123" }
  }'
const res = await fetch("https://replyfirst.ae/api/v1/leads", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.RF_ORG_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    name: "Jane Buyer",
    phone: "+971501234567",
    profile: { budget: "1.5M AED" },
    external_ref: { system: "my-crm", id: "crm-123" },
  }),
});
const { created, lead } = await res.json();
import os, requests

res = requests.post(
    "https://replyfirst.ae/api/v1/leads",
    headers={"Authorization": f"Bearer {os.environ['RF_ORG_TOKEN']}"},
    json={
        "name": "Jane Buyer",
        "phone": "+971501234567",
        "profile": {"budget": "1.5M AED"},
        "external_ref": {"system": "my-crm", "id": "crm-123"},
    },
)
created, lead = res.json()["created"], res.json()["lead"]

Pass an external_ref and every future event about that lead carries it back, so you can match events to your own records.

Receive events out

Set a webhook URL and pick the events you care about. Reply First POSTs a signed JSON payload whenever a lead is created, changes stage, becomes qualified, or a handoff moves. Verify the X-Qualifier-Signature HMAC, dedupe on X-Qualifier-Delivery, and respond 2xx fast. Full envelope, event catalog, and a verification snippet are on the Webhooks page.

Avoid sync loops

Two rules keep a two-way sync from ping-ponging: Reply First never echoes leads you created via the API, and closed is the only stage you can write back. See the echo-loop contract on the Webhooks page.

Next steps

On this page