Skip to content

POST /public/v1/leads ​

AuthRequired
Scopeleads:write
Idempotency-KeyRequired

Creates or updates a CRM lead. Staff see it under CRM on the stage you send.

The same external_reference updates the existing lead. amount_cents is the expected engagement fee in cents, not a property value. Value language in notes is removed.

Point at one organization ​

Send exactly one of:

FieldWhen
organization_external_referenceYou already synced the company and stored its source id
organization_idYou stored the Appraiser Flow uuid
organizationThe company should be created or updated in this same call

A nested organization uses the organization upsert body and also requires organizations:write. Without that scope the lead call returns 403 / insufficient_scope and writes nothing.

Request ​

json
{
  "external_reference": "deal-4421",
  "external_source": "hubspot",
  "title": "Acme — 123 Main St",
  "stage": "qualified",
  "classification": "institutional_lender",
  "amount_cents": 55000,
  "organization_external_reference": "sf-001"
}

stage is lead (default), qualified, proposal, won, or lost.

classification is separate from stage:

ValueMeaning
leadLead. Default when omitted on create.
private_lenderPrivate Lender
institutional_lenderInstitutional Lender
amcAMC
realtorRealtor
attorneyAttorney

A later upsert that leaves classification out keeps the stored value.

Response fields ​

FieldType
iduuid
actioncreated or updated
external_reference, external_sourcestring or null
titlestring
stagestring
classificationlead, private_lender, institutional_lender, amc, realtor, or attorney
next_contact_ondate. New leads default to one week out.
contact_historyPrior outreach, newest first. Each item has occurred_on, method, notes, next_follow_up_on, contact_name, and created_by_name.
amount_centsint or null
notesstring or null
organization_iduuid
organization_namestring or null
organization_external_referencestring or null
created_at, updated_atdatetime

Webhook: lead.upserted (id, external reference, stage, and action only).

Try It ​

Try It calls https://api.appraiserflow.ai/public/v1 with an af_test_ key created in that same environment. The key stays in sessionStorage. af_live_ keys are blocked here; call the API from your server with a Live key.

Errors ​

StatusCodeWhen
400idempotency_key_requiredHeader missing
409idempotency_conflictSame key, different body
403insufficient_scopeMissing leads:write, or nested organization without organizations:write
404not_foundorganization_id or organization_external_reference does not match a company in this account
422validation_errorNot exactly one organization locator, or the nested organization is incomplete

API base: https://api.appraiserflow.ai/public/v1. Test and live keys created in this environment both use this base.