POST /api/contact

Submits a contact inquiry. Two doors are supported: federal (contracting officer / agency intake) and commercial (business inquiry / consulting). The core fields are the same; door-specific optional fields are passed through.

Quick reference

MethodPOST
URLhttps://truvisory.com/api/contact
Requestapplication/json
Responseapplication/json
OpenAPIcontact.json

Request body

Required (both doors)

FieldTypeDescription
doorenumfederal | commercial
namestringSubmitter's name.
emailstring (email)Reply-to email.
messagestringInquiry body. Minimum 10 characters.

Federal door (optional)

FieldTypeDescription
titlestringSubmitter's title (e.g., Contracting Officer).
agencystringAgency or component.
inquiryTypestringCategory (e.g., sole-source, RFI-response).
solicitationstringSolicitation or RFI number.

Commercial door (optional)

FieldTypeDescription
phonestringContact phone.
companystringCompany name.
rolestringSubmitter's role.
exploringstringWhat the prospect is exploring (e.g., audit, sprint).
stagestringStage of evaluation.

Metadata (optional)

FieldTypeDescription
pagestringPage path the form was submitted from.
referrerstringdocument.referrer at submit time.

Anti-spam fields (optional, always send)

This endpoint applies anti-spam checks. Always send hp as an empty string and elapsed_ms as a truthful elapsed time of at least 2000 milliseconds.

FieldTypeDescription
hpstringHoneypot. Always send an empty string; any non-empty value is treated as spam, and a request without the field may be too.
elapsed_msnumberMilliseconds you spent preparing the submission, from starting it to sending it. Always send a truthful value of at least 2000; a smaller value is treated as spam, and a request without the field may be too.

A submission that trips an anti-spam check (a non-empty hp, an elapsed_ms below 2000, or an email address on a known disposable-email domain) receives the normal success response but is not recorded, so a success response alone does not confirm the inquiry was stored.

Response (200)

{ "ok": true, "id": 1023 }

Errors

StatusBody (error)Cause
400invalid_doordoor is missing or not federal/commercial.
400name_requiredEmpty/missing name.
400email_invalidMissing or malformed email.
400message_too_shortmessage shorter than 10 characters.
400invalid_jsonBody is not parseable JSON.
413payload_too_largeBody exceeds the size limit.
429rate_limitedToo many submissions from this IP.

Example — federal

curl -X POST https://truvisory.com/api/contact \
  -H 'content-type: application/json' \
  -d '{
    "door": "federal",
    "name": "Pat KO",
    "email": "pat@agency.gov",
    "title": "Contracting Officer",
    "agency": "DHS / CISA",
    "inquiryType": "sole-source",
    "solicitation": "70RCSA26Q00001234",
    "message": "Requesting a capability statement and SDVOSB confirmation.",
    "hp": "",
    "elapsed_ms": 8000
  }'