Lead Sync API
Use the Reflekt Legal Lead API to sync leads into your project programmatically. Send a single POST request with form data to create a lead and, optionally, enroll it into a campaign.
This is useful when you want to push leads from a custom website form, a marketing tool, or any system that can send an HTTP request.
Endpoint
POST https://us-api.reflektlegal.ai/api/v1/lead
- Method:
POST - Payload type: form (
multipart/form-dataorapplication/x-www-form-urlencoded)
Prerequisites
Before you begin, make sure you have:
- An active Reflekt Legal account.
- Your project API key. Find it under your project's Integrations settings.
- The campaign internal name (optional) if you want to enroll the lead into a campaign. Ask the Reflekt Legal team for the exact value.
Treat your API key like a password. Store it securely and only send it from a trusted server, never from public client-side code.
Authentication
The api_key authenticates the request and routes the lead to your project. You can send it in any of the following ways:
- As a form field named
api_key(recommended). - As a form field named
ApiKey. - As an
?api_key=query string parameter.
A missing or invalid key returns an authorization error.
Request Fields
Send the lead data as form fields. At least one of email or phone_number is required.
| Field | Required | Notes |
|---|---|---|
api_key | Yes | Authenticates the request and routes the lead to your project. Find it under your project's Integrations settings. |
email | Conditionally | At least one of email or phone_number is required. Must be a valid email address. |
phone_number | Conditionally | At least one of email or phone_number is required. Any reasonable format works — it's normalized server-side (E.164). |
first_name | No | Auto-capitalized. |
last_name | No | Auto-capitalized. |
company_name | No | Sanitized/normalized server-side. |
campaign_name | No | Enrolls the lead into a campaign/environment. Use the campaign's internal name, not its display name. Ask the Reflekt Legal team for the exact value. If it doesn't match, the lead is still created but enrollment is silently skipped. |
notes | No | Free-text context about the lead. |
address | No | Optional mailing/street address. |
birthday | No | Format YYYY-MM-DD. |
friendly_name | No | Optional display name override. |
If campaign_name doesn't match an existing campaign, the lead is still created — only the campaign enrollment step is skipped. Double-check the internal name with the Reflekt Legal team if a lead isn't enrolled as expected.
Example Request
Replace the placeholder values with your own. YOUR_PROJECT_API_KEY is your project API key, and YOUR_CAMPAIGN_INTERNAL_NAME is the campaign's internal name.
curl -X POST https://us-api.reflektlegal.ai/api/v1/lead \
-F "api_key=YOUR_PROJECT_API_KEY" \
-F "first_name=Jane" \
-F "last_name=Doe" \
-F "[email protected]" \
-F "phone_number=+15551234567" \
-F "company_name=Acme LLC" \
-F "campaign_name=YOUR_CAMPAIGN_INTERNAL_NAME" \
-F "notes=Came in from the website contact form"
Verify
Confirm the integration is working:
- Send a test request with the example above, using a real email or phone number.
- Confirm the new lead appears in your Reflekt Legal project.
- If you included
campaign_name, confirm the lead is enrolled in the expected campaign.
If a request fails, recheck the api_key value and make sure you are sending at least one of email or phone_number.
If you need help validating your setup, contact [email protected].