Skip to content

POST /public/v1/organizations ​

AuthRequired
Scopeorganizations:write
Idempotency-KeyRequired

Creates a client, lender, AMC, or other organization, or updates the one that already matches. Staff see the record under Clients.

Send external_reference from your database on every run. That id is how later calls update the same company after the idempotency key expires.

Match order ​

  1. external_reference
  2. account_number, when exactly one organization has that number
  3. Exact name

A name or account number already tied to a different external_reference returns 409. The office record is left unchanged.

Request ​

json
{
  "external_reference": "sf-001",
  "external_source": "salesforce",
  "name": "Acme Mortgage",
  "client_type": "lender",
  "phone": "(615) 555-0100",
  "email": "orders@acme.example",
  "account_number": "ACME-100",
  "contacts": [
    {
      "external_reference": "sf-contact-9",
      "display_name": "Jordan Lee",
      "email": "jordan@acme.example",
      "phone": "(615) 555-0101",
      "contact_type": "order_assigner",
      "is_primary": true
    }
  ]
}

client_type is lender, amc, private_party, or other.

Lenders may omit phone, email, website, and address. Every other type needs phone, email, website, address_line1, city, state (two letters), and postal_code.

Phones are 10-digit US numbers and are stored as (615) 555-0100.

Contacts are optional, up to 25. Each contact needs display_name, email, and contact_type (order_assigner, account_manager, billing, or other). other also needs other_label. One contact may be is_primary. Contacts you leave out of the array are not deleted. A contact matches external_reference, then email.

Phrases that state an appraisal value are removed from notes.

Response fields ​

FieldType
iduuid
actioncreated or updated
external_referencestring or null
external_sourcestring or null
namestring
client_typestring
phone, email, websitestring or null
address_line1, address_line2, city, state, postal_codestring or null
account_number, amc_license_numberstring or null
notesstring or null
is_active, paid_when_paidbool
contactsarray of contact records, each with id
created_at, updated_atdatetime

Webhook after commit: organization.upserted (id, external reference, type, 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_scopeKey lacks organizations:write
409name_conflictName is already linked to another external id
409ambiguous_matchAccount number matches more than one organization
409external_reference_conflictAccount number is linked to another external id
409contact_conflictContact email is linked to another external id
422validation_errorMissing required fields, bad phone, or bad email

API base: https://staging-api.appraiserflow.ai/public/v1 (af_test_ keys)