PATCH /v1/contacts/{id}
Update a contact (partial)
Update a contact (partial)
Changes only the fields that are sent; omitted fields keep their values (no defaults are applied). Requires scope write:deals.
- Автентифікація: заголовок
Authorization: Bearer rv_live_...(API-ключі та scopes) - Потрібний scope:
write:deals
openapi.json) і подається англійською, як у самому API.Параметри
| Поле | Де | Тип | Обов’язк. | Опис |
|---|---|---|---|---|
id | path | string (uuid) | так | Resource id (UUID). |
Тіло запиту
| Поле | Тип | Обов’язк. | Опис |
|---|---|---|---|
type | "lead" | "client" | "partner" | ні | |
fullName | string | ні | |
ownerUserId | string | null (uuid) | ні | |
tags | string[] | ні | |
consentMarketing | boolean | ні | |
preferredChannel | "telegram" | "viber" | "email" | "sms" | "webhook" | "in_app" | null | ні | |
locale | "uk" | "pl" | "en" | ні | |
notes | string | null | ні | |
utm | object | null | ні |
Відповіді
200
The updated contact.
application/json · Схема: ContactDetail
| Поле | Тип | Обов’язк. | Опис |
|---|---|---|---|
contact | object | так | |
contact.id | string (uuid) | так | |
contact.type | "lead" | "client" | "partner" | так | |
contact.fullName | string | так | |
contact.phones | string[] | так | E.164. |
contact.emails | string[] | так | |
contact.telegramId | string | null | так | |
contact.telegramUsername | string | null | так | |
contact.viberId | string | null | так | |
contact.source | "site" | "telegram" | "instagram" | "referral" | "ads" | "manual" | "viber" | "widget" | "extension" | "api" | "import" | "marketplace" | так | |
contact.ownerUserId | string | null (uuid) | так | |
contact.tags | string[] | так | |
contact.consentMarketing | boolean | так | |
contact.preferredChannel | "telegram" | "viber" | "email" | "sms" | "webhook" | "in_app" | null | так | |
contact.locale | "uk" | "pl" | "en" | так | |
contact.notes | string | null | так | |
contact.createdAt | string | так | ISO 8601 date-time (UTC). |
contact.updatedAt | string | так | ISO 8601 date-time (UTC). |
owner | object | так | |
owner.id | string (uuid) | так | |
owner.name | string | так | |
counts | object | так | |
counts.deals | integer | так | |
counts.openDeals | integer | так | |
counts.requests | integer | так | |
counts.openTasks | integer | так |
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
404
No such contact in this tenant.
application/problem+json · Схема: Problem
422
Invalid phone/email or other field.
application/problem+json · Схема: Problem
429
Rate limit exceeded for the tenant plan (code rate_limited). Wait Retry-After seconds.
application/problem+json · Схема: Problem