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

POST/api/webhook/leadsProfessional+

Create a new lead/client from an external source (website form, Zapier, etc.)

Auth: API Key

GET/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.

EventDescription
work_order.createdA new work order is created
work_order.status_changedA work order status changes (scheduled, in_progress, completed, invoiced)
invoice.sentAn invoice is sent to a client
invoice.paidAn invoice payment is recorded
client.createdA new client is added

Getting Started

1

Generate an API key

Go to Organization Settings and click "Generate API Key". Copy and store it securely.

2

Test the endpoint

Send a GET request to /api/webhook/leads with your API key to verify connectivity.

3

Send your first lead

POST a JSON payload with name, email, phone, and optional service/notes fields.

4

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.