Skip to main content

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-data or application/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.
caution

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.

FieldRequiredNotes
api_keyYesAuthenticates the request and routes the lead to your project. Find it under your project's Integrations settings.
emailConditionallyAt least one of email or phone_number is required. Must be a valid email address.
phone_numberConditionallyAt least one of email or phone_number is required. Any reasonable format works — it's normalized server-side (E.164).
first_nameNoAuto-capitalized.
last_nameNoAuto-capitalized.
company_nameNoSanitized/normalized server-side.
campaign_nameNoEnrolls 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.
notesNoFree-text context about the lead.
addressNoOptional mailing/street address.
birthdayNoFormat YYYY-MM-DD.
friendly_nameNoOptional display name override.
note

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:

  1. Send a test request with the example above, using a real email or phone number.
  2. Confirm the new lead appears in your Reflekt Legal project.
  3. 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].