ImportOS · Документація
Довідник API

POST /v1/contacts

Create a contact

Create a contact

Creates a contact with source "api". Supports Idempotency-Key. Requires scope write:deals.

  • Автентифікація: заголовок Authorization: Bearer rv_live_... (API-ключі та scopes)
  • Потрібний scope: write:deals
Опис операції, параметрів і полів походить зі специфікації OpenAPI (openapi.json) і подається англійською, як у самому API.

Параметри

ПолеДеТипОбов’язк.Опис
idempotency-keyheaderstringніMakes a retry of this POST safe for 24 hours: the same key and body returns the stored response (Idempotent-Replay: true).

Тіло запиту

ПолеТипОбов’язк.Опис
type"lead" | "client" | "partner"ні
fullNamestringтак
phonesstring[]ні
emailsstring[]ні
telegramIdstring | number | nullні
telegramUsernamestring | nullні
viberIdstring | nullні
ownerUserIdstring | null (uuid)ні
tagsstring[]ні
consentMarketingbooleanні
preferredChannel"telegram" | "viber" | "email" | "sms" | "webhook" | "in_app" | nullні
locale"uk" | "pl" | "en"ні
notesstring | nullні
utmobject | nullні
allowDuplicatebooleanніCreate even if a contact with the same phone/email/Telegram exists (otherwise 409 with duplicate_ids).

Відповіді

201

The created contact.

application/json · Схема: Contact

ПолеТипОбов’язк.Опис
idstring (uuid)так
type"lead" | "client" | "partner"так
fullNamestringтак
phonesstring[]такE.164.
emailsstring[]так
telegramIdstring | nullтак
telegramUsernamestring | nullтак
viberIdstring | nullтак
source"site" | "telegram" | "instagram" | "referral" | "ads" | "manual" | "viber" | "widget" | "extension" | "api" | "import" | "marketplace"так
ownerUserIdstring | null (uuid)так
tagsstring[]так
consentMarketingbooleanтак
preferredChannel"telegram" | "viber" | "email" | "sms" | "webhook" | "in_app" | nullтак
locale"uk" | "pl" | "en"так
notesstring | nullтак
createdAtstringтакISO 8601 date-time (UTC).
updatedAtstringтакISO 8601 date-time (UTC).

400

Invalid request parameters or body (code validation_error).

application/problem+json · Схема: Problem

401

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

application/problem+json · Схема: Problem

403

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

application/problem+json · Схема: 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 · Схема: Problem

422

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

application/problem+json · Схема: Problem

429

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

application/problem+json · Схема: Problem

На цій сторінці