Skip to content

Send in leads

Send each enquiry to Progz the moment it arrives, from your website, CRM or ad forms, then ask your AI employee to call. The faster the call, the more people pick up and book.

1. Find your offering

Every lead is for an offering: the project, service or course your AI employee sells. Look up its id once and keep it in your settings:

Request
curl "https://progz.in/api/v1/offerings?status=active" \
  -H "Authorization: Bearer $PROGZ_API_KEY"
Response 200 (shortened)
[
  {
    "id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
    "name": "3 BHK apartments, Kondapur",
    "status": "active",
    "employee_id": "65da53ba-cbf3-48f0-ae83-b5c17fb445fc",
    …
  }
]

You can also copy it from the app: open the offering, and the id is the last part of the address (/offerings/a1b2…). Calls only go out while the offering is active.

2. Create the lead

Send POST /leads with the offering and the person. A member key is enough.

Request
curl -X POST "https://progz.in/api/v1/leads" \
  -H "Authorization: Bearer $PROGZ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "offering_id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
    "contact": {
      "full_name": "Ravi Kumar",
      "phone": "98765 43210",
      "email": "ravi@example.com",
      "preferred_language": "te-IN"
    },
    "facts": {
      "product_interest": "3 BHK",
      "budget_inr": 6500000,
      "purchase_timeline_days": 60
    },
    "source": "website",
    "notes": "Asked about the east-facing units."
  }'
FieldRequiredWhat it is
offering_idYesThe offering from step 1.
contact.full_nameYesTheir name, up to 200 characters.
contact.phoneYesTheir mobile. Indian numbers with or without +91; others with + and the country code.
contact.emailYes, todayBooking details are sent by email, so a new person needs one (else 422 email_required).
contact.preferred_languageNoThe language to call in, e.g. te-IN, hi-IN, en-IN.
contact.whatsapp_opt_inNoWhether they agreed to WhatsApp messages. Default false.
contact_idInstead of contactAn existing contact's id, when you already have one.
factsNoWhat they already told you. Only the fields listed in Facts.
sourceNoWhere they came from, e.g. website, facebook_ads. Lowercase letters, digits and _.
notesNoAnything else for your team, up to 5,000 characters.

The answer is the new lead with status new. Store its id next to your own record:

Response 201
{
  "id": "3f6c2a1e-8b4d-4c1a-9e2f-5d7b8a9c0e11",
  "offering_id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
  "offering_name": "3 BHK apartments, Kondapur",
  "contact": {
    "id": "9e8d7c6b-5a49-4382-9170-6f5e4d3c2b1a",
    "full_name": "Ravi Kumar",
    "phone": "+919876543210",
    "email": "ravi@example.com",
    "preferred_language": "te-IN",
    "do_not_contact": false,
    "whatsapp_opt_in": false
  },
  "status": "new",
  "facts": { "product_interest": "3 BHK", "budget_inr": 6500000, "purchase_timeline_days": 60 },
  "interest": null,
  "notes": "Asked about the east-facing units.",
  "source": "website",
  "call_requested_at": null,
  "created_at": "2026-10-24T06:30:11.204Z",
  "updated_at": "2026-10-24T06:30:11.204Z",
  "call_timing": null
}

3. Ask for the call

Creating a lead doesn't call them. When you want the call, ask for it:

Request
curl -X POST "https://progz.in/api/v1/leads/3f6c2a1e-8b4d-4c1a-9e2f-5d7b8a9c0e11/request-qualification" \
  -H "Authorization: Bearer $PROGZ_API_KEY"

The answer is the lead again (200). Your AI employee calls within your calling hours: straight away during them, or first thing when they start. These answers mean no call was started:

StatuscodeWhyWhat to do
409call_waitingThe employee isn't working yet, the process is off, or the wallet is empty.Nothing: it is kept and calls by itself once that is fixed.
409offering_not_activeThe offering is a draft, paused or closed.Activate the offering in the app.
409do_not_contactThis person asked not to be contacted.Don't call them.
409already_in_progressA call for this lead is already queued or happening.Nothing.
409lead_closedThe lead is already booked, not interested or closed.Nothing.

Facts you can send

Facts are what the person already told you. Your AI employee won't ask again, and your qualification rules use them. Send only what you know; leave the rest out.

FactTypeMeaning
company_nametextTheir company.
roletextTheir job title.
team_sizewhole numberPeople in their team or company.
budget_inrwhole rupeesThe budget they stated.
purchase_timeline_dayswhole days, 0–3650How soon they plan to buy (0 = now; two months = 60).
needtextWhat they want to solve, in their words.
current_solutiontextWhat they use today.
locationtextCity or area.
decision_makertrue / falseDo they make or sign off the purchase?
interestedtrue / falseAre they interested?
product_interesttextExactly what they want, e.g. 3 BHK, 5 kW rooftop.
owns_propertytrue / falseDo they own the home, roof or premises?
monthly_spend_inrwhole rupeesWhat they spend each month today, e.g. the electricity bill.
purposetextE.g. own use, investment, for a child.
needs_financingtrue / falseDo they need a loan or EMI?
for_whomtextWho the booking is for: self, or e.g. mother.
attendee_nametextWho will come, when it is not the person enquiring.
returning_customertrue / falseHave they visited or bought before?
preferred_timetextWhen they would like to come, e.g. Saturday morning.
visit_reasontext, one short lineThe reason for a visit, e.g. tooth pain. Never medical detail.
preferred_branchtextThe branch or campus they want.
qualificationtextThe student's current or last class or degree, e.g. Inter MPC, passing 2026.
Only these names
Any other name (for example business_type, or a typo like budjet_inr) rejects the whole request with 422. Amounts are whole rupees (one lakh is 100000), timelines whole days, never words.

People you already have

  • Same phone number, same business: Progz keeps one contact per number. A new lead for someone already known joins their existing contact; the name and email you send don't replace the ones on file.
  • Same person, same offering: the second request gets 409 already_lead. Treat it as success: they are already with your AI employee.
  • Same person, another offering: that is a separate lead, and allowed.

Example: your website's enquiry form

On your server, create the lead and ask for the call in one go. Never call the API from the visitor's browser: that would expose your key.

Node.js
// Your server, when your website's enquiry form is submitted (Node.js 18+).
const API = "https://progz.in/api/v1";
const headers = {
  Authorization: `Bearer ${process.env.PROGZ_API_KEY}`,
  "Content-Type": "application/json",
};

export async function sendEnquiry(form) {
  // 1. Create the lead.
  let response = await fetch(`${API}/leads`, {
    method: "POST",
    headers,
    body: JSON.stringify({
      offering_id: process.env.PROGZ_OFFERING_ID,
      contact: { full_name: form.name, phone: form.phone, email: form.email },
      source: "website",
    }),
  });
  let body = await response.json();
  if (response.status === 409 && body.error.code === "already_lead") return; // already with us
  if (!response.ok) throw new Error(`Progz: ${body.error.code}: ${body.error.message}`);

  // 2. Ask the AI employee to call.
  response = await fetch(`${API}/leads/${body.id}/request-qualification`, { method: "POST", headers });
  if (response.ok) return;
  body = await response.json();
  if (body.error.code === "call_waiting") return; // kept: the call starts by itself later
  throw new Error(`Progz: ${body.error.code}: ${body.error.message}`);
}
No server? Use a form link
If you just want a form that calls people back, share your AI employee's public form link (in the app, on the offering). Submissions are called automatically, usually within a minute, with no code at all.

Many leads at once (CSV)

To load a list, send a CSV file to the offering. Headers are matched loosely: name or full_name, phone or mobile, email, language, company. Name and phone are required.

leads.csv
name,phone,email,language,company
Ravi Kumar,98765 43210,ravi@example.com,te-IN,
Anita Rao,+91 91234 56789,anita@example.com,en-IN,Rao Builders
Request
curl -X POST "https://progz.in/api/v1/offerings/a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d/leads/import?call=true" \
  -H "Authorization: Bearer $PROGZ_API_KEY" \
  -H "Content-Type: text/csv" \
  --data-binary @leads.csv
Response 200
{
  "created": 2,
  "reused_contacts": 0,
  "skipped_existing": 0,
  "calling": 2,
  "errors": []
}
  • Add ?call=true to queue a call for every new lead; leave it off to only save the list. With call=true the offering must be active (else 409 offering_not_active) and its AI employee must have finished setup (else 409 no_working_employee).
  • Up to 5,000 rows and 2 MB per file, UTF-8 encoded.
  • A row with a problem doesn't stop the rest: it is listed in errors with its row number. People who are already leads for this offering are counted in skipped_existing.

Next

Once the call has happened, read the lead back to see its status, the facts collected and any booking: see Track results. See Errors, limits & paging for retries and rate limits.