iQuanta · Integration Guide

Lead Capture API

One endpoint: send us a name and phone number whenever someone fills out a form on the website, and it lands in the CRM as a lead — no dashboard login required, just a shared key.

Method & URL
POSThttps://razorpay-dashboard-4cba2.web.app/api/public/leads
Auth header
X-API-Key: <your key>
Content type
application/json

Authentication

One shared key, sent as a header

Every request needs an X-API-Key header set to the key we'll send you separately (never in this document, and never in chat/email in plaintext if you can help it — use a secrets manager or a one-time share link). It's a platform-wide key, also valid for the Manual Booking API.

Call this from your server, not the browser. Anything sent to the page's own JavaScript can be read by anyone who opens dev tools. Have your form post to your own backend, and have your backend call us with the key attached.

A missing or wrong key gets 401 Unauthorized.

Request

What to send

A JSON body with the lead's details. phone is the only required field — it's how we tell whether this is a new person or someone we've already heard from.

FieldTypeNotes
phonestringRequiredAny format — with or without +91, spaces, dashes. We normalize to the last 10 digits, so the same person always matches to one lead even across multiple form fills.
namestringOptionalShown as-is in the CRM. Leave it out if your form doesn't collect it.
emailstringOptionalStored lowercase; not validated for format on our end, so validate on yours if that matters to you.
sourcestringOptionalA short tag for where this lead came from — e.g. homepage-form, demo-cta. Defaults to website if you don't send one. Use different tags per form if you have more than one — it's how we'll tell them apart later.
Example request body
{
  "name": "Ananya Rao",
  "phone": "9876543210",
  "email": "ananya.rao@example.com",
  "source": "homepage-contact-form"
}

Response

What you get back

201 Created  New lead, or an existing one updated
{
  "ok": true,
  "phone": "9876543210",
  "merged": false  // true if this phone number already existed
}
400 Bad Request  Missing or invalid phone
{ "error": "phone is required." }
401 Unauthorized  Missing or wrong key
{ "error": "Invalid or missing X-API-Key." }

Sending the same phone number twice is safe — the second call just updates the existing lead (merged: true) instead of creating a duplicate. Retry freely on network failures.

Quick start

Wiring it up

  1. Your form posts to your backend, same as it does today.

  2. Your backend forwards name, phone, email to the endpoint above, with the key attached.

  3. Show your usual "thanks, we'll be in touch" state — you don't need to wait on us or show the response to the visitor.

cURL
curl -X POST https://razorpay-dashboard-4cba2.web.app/api/public/leads \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_KEY_HERE" \
  -d '{"name":"Ananya Rao","phone":"9876543210","source":"homepage-contact-form"}'
Node.js
await fetch('https://razorpay-dashboard-4cba2.web.app/api/public/leads', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-API-Key': process.env.IQUANTA_LEADS_KEY
  },
  body: JSON.stringify({ name, phone, email, source: 'homepage-contact-form' })
});
PHP
// requires the cURL extension
$ch = curl_init('https://razorpay-dashboard-4cba2.web.app/api/public/leads');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  'Content-Type: application/json',
  'X-API-Key: ' . getenv('IQUANTA_LEADS_KEY')
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
  'name' => $name, 'phone' => $phone, 'source' => 'homepage-contact-form'
]));
$response = curl_exec($ch);

Good to know

Where the lead ends up

It shows up immediately in the CRM's Leads table, tagged with whatever source you sent, in the "Fresh" stage. It gets auto-assigned to a mentor the same way a lead from a payment does. Nothing further happens automatically — no SMS or email fires on our end from this call alone.