Names
firstName and lastName are required, cannot be blank, and should not exceed 100 characters.
Developers
Submit qualified referral leads securely to Defiant Law using a straightforward HTTPS JSON endpoint.
The complete Power Automate endpoint contains a SAS signature and must be treated as a secret. The production URL is delivered separately to approved partners and is intentionally excluded from this public documentation package.
Access is controlled through the Microsoft Power Automate SAS-signed endpoint.
No separate API key or OAuth token is currently required. The complete endpoint URL—including its query string—is the credential.
Send one lead per request using HTTP POST.
Content-Type: application/jsonAccept: application/jsonSend a JSON object using the field names below.
{
"externalLeadId": "LGT-123456",
"firstName": "John",
"lastName": "Doe",
"phone": "9095551234",
"email": "john.doe@example.com",
"state": "CA",
"bestTime": "Afternoon",
"preferredLanguage": "English",
"campaign": "California Solar Campaign",
"notes": "Customer requested an afternoon callback.",
"submittedAt": "2026-07-27T21:30:00Z"
}
| Field | Type | Required | Description |
|---|---|---|---|
externalLeadId | string | Recommended | Unique identifier assigned by the referral partner. |
firstName | string | Yes | Lead's first name. |
lastName | string | Yes | Lead's last name. |
phone | string | Yes | Primary telephone number. |
email | string | Yes | Valid email address. |
state | string | Yes | Two-letter supported state abbreviation. |
bestTime | string | No | Preferred time for contact. |
preferredLanguage | string | No | Preferred language: English or Spanish. |
campaign | string | No | Partner campaign name or identifier. |
notes | string | No | Additional information about the lead. |
submittedAt | string | Recommended | ISO 8601 UTC submission timestamp. |
Requests that fail validation return a 400 or 422 response.
firstName and lastName are required, cannot be blank, and should not exceed 100 characters.
Common US formats are accepted, including 9095551234, (909) 555-1234, and +1 909-555-1234.
A syntactically valid email address is required and should not exceed 254 characters.
Supported values: AZ, CA, NM, NV, and TX.
Supported values: English and Spanish. Values are normalized without case sensitivity.
Use ISO 8601 UTC, for example 2026-07-27T21:30:00Z.
A successful request creates a lead and returns its Defiant Law Intake ID.
{
"success": true,
"intakeId": "lgt-a63f1358-79db-4f3b-9d23-8f26994a4852",
"message": "Lead created."
}
Use the HTTP status and machine-readable error code to determine the appropriate action.
| Status | Code | Meaning | Retry? |
|---|---|---|---|
| 400 | INVALID_REQUEST | Malformed JSON or missing required field. | No |
| 409 | DUPLICATE_LEAD | The same external lead ID was already received. | No |
| 422 | VALIDATION_ERROR | One or more values failed validation. | No |
| 429 | RATE_LIMIT_EXCEEDED | More than 100 requests were submitted in one minute. | Yes |
| 500 | INTERNAL_ERROR | The lead could not be processed. | Yes |
| 503 | SERVICE_UNAVAILABLE | The service is temporarily unavailable. | Yes |
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "One or more fields failed validation.",
"details": [
{
"field": "state",
"message": "State must be one of: AZ, CA, NM, NV, or TX."
}
]
}
}Apply exponential backoff only to temporary failures.
Replace the endpoint placeholder with the secure URL provided by Defiant Law.
curl --request POST \
--url "[PARTNER-SPECIFIC-POWER-AUTOMATE-ENDPOINT]" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data @lead.jsonconst response = await fetch(process.env.DEFIANT_LEAD_ENDPOINT, {
method: "POST",
headers: {
"Content-Type": "application/json",
"Accept": "application/json"
},
body: JSON.stringify(lead)
});
if (!response.ok) {
throw new Error(`Lead submission failed: ${response.status}`);
}
const result = await response.json();import os
import requests
response = requests.post(
os.environ["DEFIANT_LEAD_ENDPOINT"],
json=lead,
headers={"Accept": "application/json"},
timeout=90,
)
response.raise_for_status()
result = response.json()Use these files to accelerate implementation and testing.
Contact Defiant Law Intake Operations and include the partner name, external lead ID, request timestamp, and HTTP status received. Do not send the complete SAS endpoint in ordinary email threads.