Skip to content

Lead intake API

Send qualified small-business funding leads to Cashifi over HTTPS. Every partner gets their own URL + API key — request yours by emailing your Cashifi account contact.

Endpoint

POST {ENDPOINT_URL}
Content-Type: application/json
Authorization: Bearer {YOUR_API_KEY}

{ENDPOINT_URL} is the URL we sent you in the welcome email. {YOUR_API_KEY} is your secret bearer token — treat it like a password and never commit it to a public repo.

Request body

Send a JSON object with the borrower's contact + business info. At minimum either contact_email or contact_phone is required; everything else is optional but helps us match them to lenders faster.

FieldTypeDescription
contact_namestringFull name of the borrower (≤ 120 chars).
contact_emailstringBorrower's email — must look like name@example.com.
contact_phonestringBorrower's phone — any reasonable format; we'll normalize.
company_namestringBusiness name (≤ 200 chars).
monthly_revenuenumberMonthly gross revenue in USD. JSON number, not a string.
amount_requestednumberHow much funding the borrower is asking for, in USD.
desired_loan_amountnumberAlias for amount_requested if you already use that field.
business_typestringIndustry / vertical (≤ 50 chars).
utmobjectOptional flat object of UTM tags (utm_source, utm_campaign, …).
sms_consentbooleanTrue if the borrower opted in to SMS.
email_consentbooleanTrue if the borrower opted in to email.

Extra fields you send are ignored — sending unknown keys won't fail the request.

Example request

curl -X POST {ENDPOINT_URL} \
  -H "Authorization: Bearer {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "contact_name": "Jane Doe",
    "contact_email": "jane@acme.com",
    "contact_phone": "555-123-4567",
    "company_name": "Acme Trucking LLC",
    "monthly_revenue": 85000,
    "amount_requested": 150000,
    "business_type": "trucking",
    "utm": { "utm_source": "your_brand", "utm_campaign": "q3" },
    "sms_consent": true,
    "email_consent": true
  }'

Success response

{
  "ok": true,
  "lead_id": "9c2f4d1e-8a8b-4f3e-9f2a-2b0d6c1c1e7a"
}

Status code is 201. Save the lead_id if you want to reference the lead in a support ticket.

Error responses

Every error has the same shape so you can branch on error.code instead of parsing the message string. Codes are stable and won't change without notice.

{
  "ok": false,
  "error": {
    "code": "missing_required_field",
    "message": "Either \"contact_email\" or \"contact_phone\" is required.",
    "hint": "Every lead needs at least one way for us to reach the borrower."
  }
}
HTTPerror.codeWhat happenedHow to fix
400invalid_jsonBody wasn't valid JSON.Set Content-Type: application/json and send a real JSON object.
400invalid_bodyBody was JSON but not an object.Wrap the lead in { ... } — arrays and bare strings aren't accepted.
400missing_required_fieldNeither email nor phone provided.Include at least one of contact_email or contact_phone.
400invalid_field_formatA field had the right type but a bad value (e.g. malformed email).See error.field for the offender and error.hint for the fix.
400invalid_field_typeA field had the wrong JSON type (e.g. number sent as string).Send the type listed in the table above.
400value_out_of_rangeA numeric field was negative or absurdly large.Use a sane value under 1,000,000,000.
401missing_authorizationNo Authorization header.Add Authorization: Bearer YOUR_API_KEY.
401invalid_api_keyThe bearer token didn't match.Double-check the key from the welcome email — they're case-sensitive.
403endpoint_pausedYour endpoint is temporarily disabled.Contact your Cashifi account contact.
404endpoint_not_foundThe URL token in the path isn't recognized.Make sure you're hitting the URL we sent you exactly.
429rate_limitedYou're sending too fast.Back off and retry — see the Retry-After response header.
5xxserver_errorSomething broke on our side.Safe to retry after a few seconds; reach out if it persists.

Idempotency & retries

Lead submissions are not idempotent today — retrying the same payload will create a second lead. If you need at-most-once delivery, store the lead_id on your side and skip the resend after a successful response.

Need help?

Email your Cashifi account contact and include:

  1. A sample of the JSON you tried to send (redact PII).
  2. The error response we returned.
  3. The approximate time the request was made.

We log every request — including the failed ones — so we can pinpoint exactly what went wrong.