API Documentation
Integrate external tools, capture leads from your website, and automate workflows with the Smarfle CRM API.
API Key Auth
Generate API keys in your organization settings. Include the key in theX-API-Keyheader.
Webhook Events
Receive real-time notifications when events happen in your account. Configure endpoints in settings.
Rate Limited
100 requests per minute per API key. All requests are logged and billed at $0.003/call on Professional+ plans.
REST Endpoints
/api/webhook/leadsProfessional+Create a new lead/client from an external source (website form, Zapier, etc.)
Auth: API Key
/api/webhook/leadsProfessional+Verify your API key and check endpoint availability
Auth: API Key
Example: Create a lead
curl -X POST https://www.smarfle.com/api/webhook/leads \
-H "Content-Type: application/json" \
-H "X-API-Key: your_api_key_here" \
-d '{
"name": "John Smith",
"email": "john@example.com",
"phone": "555-0123",
"service": "HVAC Repair",
"notes": "Submitted via website contact form"
}'Webhook Events
Configure a webhook URL in your organization settings to receive POST requests when these events occur.
| Event | Description |
|---|---|
work_order.created | A new work order is created |
work_order.status_changed | A work order status changes (scheduled, in_progress, completed, invoiced) |
invoice.sent | An invoice is sent to a client |
invoice.paid | An invoice payment is recorded |
client.created | A new client is added |
Getting Started
Generate an API key
Go to Organization Settings and click "Generate API Key". Copy and store it securely.
Test the endpoint
Send a GET request to /api/webhook/leads with your API key to verify connectivity.
Send your first lead
POST a JSON payload with name, email, phone, and optional service/notes fields.
Set up webhooks (optional)
Add your webhook URL in settings to receive event notifications in real time.
Ready to integrate?
API access is available on Professional and Business plans. Start your free trial to get your API key.