ImportOS · Docs
API reference

POST /v1/leads

Register a lead

Register a lead

The single entry point for leads: finds an existing contact by phone/email/Telegram (and updates it) or creates one, assigns an owner (round-robin if enabled), creates a search request when search parameters are given and a "contact the lead" task. Supports Idempotency-Key and externalRef. Requires scope write:deals.

  • Authentication: header Authorization: Bearer rv_live_... (API keys and scopes)
  • Required scope: write:deals
Descriptions of the operation, parameters and fields come from the OpenAPI specification (openapi.json).

Parameters

FieldInTypeRequiredDescription
idempotency-keyheaderstringnoMakes a retry of this POST safe for 24 hours: the same key and body returns the stored response (Idempotent-Replay: true).

Request body

FieldTypeRequiredDescription
formstringno
fullNamestring | nullno
phonestring | nullno
emailstring | nullno
telegramIdstring | number | nullno
telegramUsernamestring | nullno
viberIdstring | nullno
locale"uk" | "pl" | "en"no
messagestring | nullno
utmobjectno
referrerstring | nullno
landingUrlstring | nullno
consentMarketingbooleanno
ownerUserIdstring | null (uuid)no
requestobjectno
request.budgetMinnumber | string | nullno
request.budgetMaxnumber | string | nullno
request.currency"UAH" | "USD" | "EUR" | "PLN" | "GEL"no
request.markets"us" | "eu" | "cn" | "kr" | "ua" | "ge"[]no
request.makestring | nullno
request.modelstring | nullno
request.yearFrominteger | nullno
request.yearTointeger | nullno
request.body"sedan" | "hatchback" | "wagon" | "suv" | "crossover" | "coupe" | "convertible" | "minivan" | "van" | "pickup" | "truck" | "motorcycle" | "other"[]no
request.fuel"petrol" | "diesel" | "hybrid" | "phev" | "ev" | "lpg" | "cng" | "hydrogen" | "other"[]no
request.gearbox"manual" | "automatic" | "cvt" | "robot" | "other"[]no
request.mileageMaxinteger | nullno
request.mustHaveobjectno
request.destinationCountrystring | nullno
request.destinationCitystring | nullno
request.searchQueryobjectno
request.searchQuery.textstringno
request.searchQuery.makestringno
request.searchQuery.modelstringno
request.searchQuery.yearFromintegerno
request.searchQuery.yearTointegerno
request.searchQuery.priceMinobjectno
request.searchQuery.priceMaxobjectno
request.searchQuery.mileageMaxKmnumberno
request.searchQuery.fuel"petrol" | "diesel" | "hybrid" | "phev" | "ev" | "lpg" | "cng" | "hydrogen" | "other"[]no
request.searchQuery.gearbox"manual" | "automatic" | "cvt" | "robot" | "other"[]no
request.searchQuery.body"sedan" | "hatchback" | "wagon" | "suv" | "crossover" | "coupe" | "convertible" | "minivan" | "van" | "pickup" | "truck" | "motorcycle" | "other"[]no
request.searchQuery.drive"fwd" | "rwd" | "awd" | "4wd"[]no
request.searchQuery.markets"us" | "eu" | "cn" | "kr" | "ua" | "ge"[]no
request.searchQuery.countriesstring[]no
request.searchQuery.noAccidentsbooleanno
request.searchQuery.sourceKeysstring[]no
request.searchQuery.limitintegerno
request.searchQuery.pageintegerno
request.notesstring | nullno
quizobjectno
calculatorobjectno
listingIdstring | null (uuid)no
externalRefstring | nullno

Responses

201

The lead was registered.

application/json · Schema: LeadResult

FieldTypeRequiredDescription
contactIdstring (uuid)yes
isNewbooleanyesfalse: an existing contact was found by phone/email/Telegram and updated.
ownerUserIdstring | null (uuid)yes
requestIdstring | null (uuid)yes
taskIdstring | null (uuid)yes
replaybooleanyestrue: the same externalRef was already processed; nothing changed.

400

Invalid request parameters or body (code validation_error).

application/problem+json · Schema: Problem

401

Missing, malformed, unknown, revoked or expired API key (code unauthorized).

application/problem+json · Schema: Problem

403

The API key lacks the scope required by this endpoint (code insufficient_scope).

application/problem+json · Schema: Problem

409

Conflict: duplicate contact (duplicate_ids), a request with this Idempotency-Key is still being processed, or the stage transition is blocked (missing[]).

application/problem+json · Schema: Problem

422

Well-formed but not acceptable data (unprocessable_input), or Idempotency-Key reused with a different request.

application/problem+json · Schema: Problem

429

Rate limit exceeded for the tenant plan (code rate_limited). Wait Retry-After seconds.

application/problem+json · Schema: Problem

On this page