API Documentation

REST API for PropIntel AI — build integrations, automations, and custom workflows

Authentication

All authenticated endpoints require a Bearer token in the Authorization header.

Authorization: Bearer pk_live_xxxxxxxxxxxx

Generate API keys from Settings → API Keys. Keys start with pk_live_ or pk_test_.

Base URL

https://api.propintel.ai

All responses are JSON with shape { success, data, error? }.

Leads

GET
/api/leads

List leads with optional filters: status, search, limit, page, projectId

POST
/api/leads

Create a new lead. Body: firstName, lastName, email?, phone?, source, budget?, location?, notes?

GET
/api/leads/:id

Get lead by ID with full AI analysis

PUT
/api/leads/:id

Update lead fields

DELETE
/api/leads/:id

Delete lead permanently

POST
/api/leads/:id/analyze

Run Agent 1 on lead — returns score + full analysis

POST
/api/leads/import

Bulk import leads. Body: { rows: [{ firstName, lastName, ... }] }

GET
/api/leads/:id/activities

Get activity timeline for a lead

GET
/api/leads/:id/score-history

Get score change history

Projects

GET
/api/projects

List all projects

POST
/api/projects

Create project. Body: name, location?, propertyType?, budget?, description?

GET
/api/projects/:id

Get project by ID

PUT
/api/projects/:id

Update project

DELETE
/api/projects/:id

Delete project

POST
/api/projects/:id/match

Run Agent 3 match for all leads against this project

Marketing

POST
/api/marketing/generate

Run Agent 2. Body: type (property_description|email_sequence|whatsapp|social_post), projectId, leadId?

GET
/api/marketing

List saved marketing content

DELETE
/api/marketing/:id

Delete marketing content

AI Agents

POST
/api/ai/negotiate/:leadId

Run Agent 4 Negotiation Coach. Body: projectId?, dealMarginPercent?

GET
/api/ai/negotiate/:leadId/history

Past negotiation sessions for a lead

POST
/api/ai/voice-to-lead

Extract lead data from transcript. Body: { transcript: string }

GET
/api/ai/brand-voice

Get current brand voice summary

POST
/api/ai/brand-voice

Train brand voice. Body: { examples: string[] }

Analytics

GET
/api/analytics/pipeline

Revenue pipeline stages with weighted probability

GET
/api/analytics/funnel

Conversion funnel with drop-off rates

GET
/api/analytics/heatmap

Bangalore zone-level lead density and scores

GET
/api/analytics/agents

Agent performance metrics

POST
/api/analytics/digest

Generate weekly AI digest

Billing

GET
/api/billing/plans

Public plan list (no auth required)

GET
/api/billing/subscription

Current subscription status and usage

POST
/api/billing/checkout

Create Stripe checkout session. Body: { planKey, returnUrl }

POST
/api/billing/portal

Open Stripe billing portal. Body: { returnUrl }

GET
/api/billing/invoices

Invoice history with PDF download links

Team

GET
/api/team

List all team members and pending invites

POST
/api/team/invite

Invite team member. Body: { email, role: AGENT|ADMIN }

PUT
/api/team/member/:id/role

Change member role. Body: { role }

DELETE
/api/team/member/:id

Remove member from company

POST
/api/team/assign

Assign lead to agent. Body: { leadId, userId }

Webhooks

GET
/api/webhooks-out

List configured outgoing webhooks

POST
/api/webhooks-out

Create webhook. Body: { url, events: string[] }

DELETE
/api/webhooks-out/:id

Delete webhook

Webhook Events

PropIntel AI signs all outgoing webhook payloads with HMAC-SHA256. Verify with your webhook secret:

X-PropIntel-Signature: sha256=<hex>

X-PropIntel-Event: lead.analyzed

lead.created
lead.analyzed
lead.status_changed
match.completed
campaign.generated
invoice.paid