Skip to content

Lead Input Schema

The LeadInput type defines all fields accepted by the createLead mutation. This page provides a complete reference for each field.

Required Fields

These fields must be provided for every lead submission.

FieldTypeFormatDescription
firstNameString!TextApplicant’s first name
lastNameString!TextApplicant’s last name
emailString!EmailValid email address
homePhoneString!10 digitsPhone number (no formatting)
address1String!TextStreet address
cityString!TextCity name
stateString!2 charsState code (e.g., CA, TX)
zipCodeString!5 digitsZIP code

Personal Information Fields

Name and Contact

FieldTypeRequiredDescription
firstNameString!YesFirst name (1-50 chars)
lastNameString!YesLast name (1-50 chars)
emailString!YesEmail address
homePhoneString!YesPrimary phone (10 digits)
cellPhoneStringNoCell phone (10 digits)
workPhoneStringNoWork phone (10 digits)

Date of Birth

FieldTypeRequiredFormatExample
dateOfBirthStringNoYYYY-MM-DD1985-06-15

Social Security Number

FieldTypeRequiredFormatExample
socialSecurityNumberStringNo9 digits123456789

Address Fields

Primary Address

FieldTypeRequiredDescription
address1String!YesStreet address
address2StringNoApt, suite, unit, etc.
cityString!YesCity name
stateString!Yes2-letter state code
zipCodeString!Yes5-digit ZIP code

Residence Details

FieldTypeRequiredDescription
residenceTypeIdIntNoType of residence (see Reference IDs)
monthsAtAddressIntNoMonths at current address
monthlyRentIntNoMonthly rent/mortgage (dollars)

Employment & Income Fields

FieldTypeRequiredDescription
incomeSourceIdIntNoIncome source type (see Reference IDs)
payFrequencyIdIntNoPay frequency (see Reference IDs)
monthlyIncomeIntNoMonthly income (dollars)
grossAnnualIncomeIntNoGross annual income (dollars)
employerNameStringNoEmployer name
monthsAtEmployerIntNoMonths at current employer

Loan & Debt Fields

FieldTypeRequiredDescription
loanAmountIntNoRequested loan amount (dollars)
loanPurposeIdIntNoLoan purpose (see Reference IDs)
estimatedDebtIntNoEstimated total debt amount (dollars)
FieldTypeRequiredDefaultDescription
termsConsentBooleanNofalseTerms and conditions consent
marketingOptInBooleanNofalseMarketing communications opt-in

Tracking Fields

FieldTypeRequiredDescription
affiliateAppIDStringNoAffiliate application ID
siteURLStringNoURL where lead was captured
siteIPStringNoServer IP address
clientIPStringNoClient IP address
refStringNoReference/tracking parameter
leadIdStringNoYour external lead ID
trustedformCertificateIDStringNoTrustedForm certificate URL

Co-Applicant Fields

Include these fields when the application has a co-applicant.

FieldTypeRequiredDescription
coApplicantBooleanNoHas co-applicant flag
coApplicantFirstNameStringNoCo-applicant first name
coApplicantLastNameStringNoCo-applicant last name
coApplicantDateOfBirthStringNoCo-applicant DOB (YYYY-MM-DD)
coApplicantAnnualIncomeIntNoCo-applicant annual income
coApplicantAddress1StringNoCo-applicant address
coApplicantAddress2StringNoCo-applicant address line 2
coApplicantCityStringNoCo-applicant city
coApplicantStateStringNoCo-applicant state
coApplicantZipCodeStringNoCo-applicant ZIP code

Complete Example

{
"input": {
"firstName": "John",
"lastName": "Test",
"email": "john.doe@gmail.com",
"homePhone": "8166999999",
"address1": "1230 Public Lane 456",
"city": "Dallas",
"state": "OH",
"zipCode": "65542",
"dateOfBirth": "1970-01-26",
"socialSecurityNumber": "123456789",
"incomeSourceId": 1,
"residenceTypeId": 2,
"payFrequencyId": 1,
"monthlyIncome": 4000,
"loanAmount": 5000,
"loanPurposeId": 1,
"estimatedDebt": 25000,
"siteURL": "yoursite.com",
"clientIP": "107.77.220.32",
"affiliateAppID": "YOUR-AFFILIATE-APP-ID",
"leadId": "YOUR-EXTERNAL-LEAD-ID",
"trustedformCertificateID": "https://cert.trustedform.com/abc123"
}
}

Validation Rules

Field Formats

FieldValidation
emailValid email format
homePhone10 digits, no formatting
dateOfBirthYYYY-MM-DD (when provided)
state2-letter state code
zipCode5 digits
socialSecurityNumber9 digits

State Codes

Valid 2-letter state codes:

AL, AK, AZ, AR, CA, CO, CT, DE, FL, GA,
HI, ID, IL, IN, IA, KS, KY, LA, ME, MD,
MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ,
NM, NY, NC, ND, OH, OK, OR, PA, RI, SC,
SD, TN, TX, UT, VT, VA, WA, WV, WI, WY,
DC, PR, VI, GU