Technical reference for marketing agencies, CRMs, and partners integrating with the iSmart A.I platform.
v1.0 · Last updated 10/27/2026
iSmart A.I is a Postgres + PostgREST backend with Deno edge functions. Integrations are supported through three channels: outbound webhooks (real-time event push), Zapier (no-code automation), and direct REST (scoped API keys for pull/sync).
Configure any HTTPS endpoint to receive real-time JSON events. No setup is required on our side beyond the destination URL.
POST https://your-endpoint.example.com/webhook ← YOUR receiving URL (placeholder)
Content-Type: application/json
{
"event": "new_lead",
"contractor_id": "uuid",
"timestamp": "2026-05-27T12:34:56.000Z",
"data": { /* lead object — see field map below */ }
}Note: the URL above is the endpoint you host to receive our events. It is not an iSmart URL. To push leads into iSmart, use the Inbound Lead Push endpoint in section 2 below.
Optional: include a shared secret in your URL (e.g. ?token=...) for verification. Retries are not automatic — endpoints should respond 2xx within 10 seconds.
Marketing agencies, Facebook lead-ad bridges, and other 3rd parties POST leads into iSmart through a single authenticated endpoint. Generate your own key under Settings → API keys and send it as the X-Intake-Secret header. Your key only ever creates leads inside your own account, and you can revoke it at any time.
POST https://srplmvwlbjpkbmsxgumi.supabase.co/functions/v1/lead-intake
Headers:
X-Intake-Secret: <your API key>
Content-Type: application/json
Body:
{
"contractor_slug": "ismartroofing", // or "contractor_id": "<uuid>"
"lead_type": "facebook", // webform | facebook | request_contact
// | request_appointment | thumbtack
// | google_lead | sms | call | chat
// | ai_chat | conversation_summary
"name": "Jane Doe",
"email": "jane@example.com", // optional
"phone": "+15555551234", // optional
"address": "123 Main St, Houston TX", // optional
"notes": "Interested in full reroof" // optional
}Returns 200 { ok: true, lead_id } on success. Common errors: 401 (missing/invalid X-Intake-Secret), 400 (validation), and 404 (unknown contractor slug/id). A response of {"error":"requested path is invalid"} means the request hit the wrong URL — double-check the path is exactly /functions/v1/lead-intake.
Fields available on every lead payload, for mapping into your CRM.
| Field | Type | Description |
|---|---|---|
| id | uuid | Unique lead identifier |
| created_at | timestamp | ISO 8601 UTC |
| contractor_id | uuid | Account the lead belongs to |
| path | enum | retail | finance | insurance |
| full_name | string | Homeowner name |
| string | Contact email | |
| phone | string | E.164 format |
| address | string | Street address |
| city | string | |
| state | string | US state code |
| zip | string | |
| roof_sqft | number | Measured roof square footage |
| pitch | string | Roof pitch estimate |
| stories | number | Building stories |
| satellite_image_url | string | Captured aerial image |
| tier | enum | good | better | best |
| quote_total | number | Quoted price in USD |
| shingle_brand | string | Selected manufacturer |
| selected_color | string | Shingle color |
| status | string | Current pipeline status |
| assigned_to | uuid | Team member ID |
| deposit_paid | boolean | Stripe deposit captured |
| appointment_at | timestamp | Scheduled inspection |
| utm_source | string | Marketing attribution |
| utm_medium | string | |
| utm_campaign | string | |
| referrer | string | HTTP referrer |
| session_id | string | Journey session |
| properties | jsonb | Free-form custom fields |
For pull-based sync or backfills. Contractors issue scoped API keys per partner from Contractor Settings → REST API keys. Each key is shown once at creation, can be revoked at any time, and is automatically scoped to that contractor's leads only.
GET https://srplmvwlbjpkbmsxgumi.supabase.co/functions/v1/partner-leads ?limit=50&offset=0 Headers: Authorization: Bearer <your-api-key>
Returns JSON: { data: Lead[], pagination: { limit, offset, total, has_more } }. Newest leads first.
Optional query parameters: limit (1–200, default 50), offset, status, path (retail | finance | insurance), since (ISO 8601 timestamp).
All webhook events above are available through a Zapier-compatible trigger endpoint. Configurable from Contractor Settings → Integrations → Zapier. Enable per-event from the same panel.
To request webhook setup, scoped REST credentials, or a sandbox account for testing, contact our team:
Contact integrations supportiSmart A.I Platform · For partner integration questions, email info@ismart-ai.app