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:

FieldTypeRequiredDescription
namestringYesName of the person submitting the inquiry. Must not contain < or >.
emailstringYesValid email address for communications.
phonestringNoOptional US format phone number. If provided, consent must be "on".
detailsstringNoInquiry message details (maximum 5000 characters).
consentstringCond.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"]
  }
}

Interested in teaming up?

Contact Us