API Documentation
Programmatic and developer integration resources for Homerun Insurance.
POST
/api/contact
Submit general inquiries or lead generation forms programmatically.
Request Format
Send standard url-encoded form data or JSON with the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name of the person submitting the inquiry. Must not contain < or >. |
email | string | Yes | Valid email address for communications. |
phone | string | No | Optional US format phone number. If provided, consent must be "on". |
details | string | No | Inquiry message details (maximum 5000 characters). |
consent | string | Cond. | Must be "on" if a phone number is provided to authorize text messages. |
Response Examples
Success (200 OK)
{
"ok": true,
"message": "Inquiry submitted successfully."
}Validation Failure (400 Bad Request)
{
"ok": false,
"type": "validation",
"fields": {
"email": ["A valid email is required"]
}
}