API Documentation

Endpoint

POST
Warning: Undefined variable $baseUrl in /var/www/shared/pages/api-docs.php on line 22
/router.php?action=import_lead

Authentication
  • Header: Authorization: Bearer YOUR_API_KEY_HERE
  • Header: Content-Type: application/json
Sample Request Body
{
	"name": "Jane Smith",
	"email": "jane.smith@example.com",
	"phone": "5551234567",
	"source": "Zillow",
	"tags": ["zillow", "buyer", "new"],
	"addresses": [
		{
			"type": "home",
			"street": "123 Main St",
			"city": "Los Angeles",
			"state": "CA",
			"zip": "90001"
		},
		{
			"street": "456 Oak Ave",
			"city": "San Diego",
			"state": "CA",
			"zip": "92101"
		}
	],
	"stage": "new",
	"type": "buyer"
}
			
  • Required: name and at least one of email or phone
  • Optional: source, tags, addresses (array, each with type (optional, defaults to OTHER), street, city, state, zip), stage, type, etc.
Sample Success Response
{
	"success": true,
	"lead_id": "uuid-or-id-here",
	"action": "created" // or "updated"
}
			
Integration Instructions
  1. Obtain your API key from your CRM admin or settings page.
  2. Send a POST request to the endpoint above with the required headers and JSON body.
  3. On success, you will receive a JSON response with the lead ID and action taken.

You can use tools like Postman, cURL, Zapier, Make, or any programming language that supports HTTP requests.

Sample cURL Command
curl -X POST "
Warning: Undefined variable $baseUrl in /var/www/shared/pages/api-docs.php on line 86
/router.php?action=import_lead" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_KEY_HERE" \ -d '{ "name": "Jane Smith", "email": "jane.smith@example.com", "phone": "5551234567", "source": "Zillow", "tags": ["zillow", "buyer", "new"], "addresses": [ { "type": "home", "street": "123 Main St", "city": "Los Angeles", "state": "CA", "zip": "90001" }, { "street": "456 Oak Ave", "city": "San Diego", "state": "CA", "zip": "92101" } ], "stage": "new", "type": "buyer" }'
Notes & Best Practices
  • Never share your API key publicly.
  • Log and monitor incoming requests for abuse or errors.
  • Test with Postman or cURL before going live with a partner.
  • If a partner can only send data by email or in a different format, use Zapier/Make or a custom script to reformat and forward to this API.
  • Address type is optional. If not provided, it will default to OTHER.
Email-to-Lead Parsing

You can also create leads by sending an email to your CRM's lead inbox. The email parser supports the same fields as the API, using simple text patterns in the email body.

  • Supported fields: name, stage, type, tags, source, addresses (with type, street, city, state, zip), phones, emails, notes, etc.
  • Addresses: Use lines like Address (HOME): 123 Main St, Springfield, IL, 62701. The type is optional and will default to OTHER if not provided.
  • Phones/Emails: Use Phone:, Phone 2:, Email:, Email 2:, etc. for multiple values.
  • Notes: Use Note:, Note 2:, etc. for multiple notes.
  • Tags: Use Tags: tag1, tag2, tag3.

Sample Email Body:

Name: Jane Smith
Stage: prospect
Type: seller
Tags: new, test, emailparser
Source: website

Address: 100 Main St, Springfield, IL, 62701
Address 2: 200 Oak Ave, Shelbyville, IL, 62565

Phone: 5551230001
Phone 2: 5551230002
Phone 3: 5551230003

Email: janesmith001@example.net
Email 2: contact.jane.smith@fakemail.org
Email 3: jsmith.random@nowhere.test

Note: This is a test note for Jane Smith.
Note 2: Second note for testing.
Note 3: Final test note.

user: {user email}
			

All fields are optional except name and at least one of email or phone. The parser will extract as much information as possible and send it to the API automatically.

AUTHENTICATING...