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",
  "amount_cents": 55000,
  "organization_external_reference": "sf-001"
}

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

Response fields ​

FieldType
iduuid
actioncreated or updated
external_reference, external_sourcestring or null
titlestring
stagestring
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://staging-api.appraiserflow.ai/public/v1 with an af_test_ key. The key stays in sessionStorage. af_live_ keys are blocked. Live server calls use https://api.appraiserflow.ai/public/v1 with an af_live_ key kept on your server.

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://staging-api.appraiserflow.ai/public/v1 (af_test_ keys)