Контакти
Люди, з якими працює організація: клієнти та їхні представники.
Список контактів
GET /contacts
Сторінками, за прізвищем та ім’ям або в порядку sort. Пошук q за ім’ям, поштою та цифрами телефону; фільтри за відповідальним, датами, угодами, задачами, тегами та власними полями.
Параметри запиту
archivedbooleanтипово
falsecfstring[]кількість ≤ 20 · довжина 1–2100
companyIdstring · uuidcreatedFromstring · date-timecreatedTostring · date-timecreatorIdsstring[] · uuidкількість ≤ 100
cursorstringдовжина 1–512
dealsstring[]кількість ≤ 2
Значення:
opennoneemailstringдовжина ≤ 100
jobTitlestringдовжина ≤ 100
limitinteger1–100 · типово
50noOwnerbooleanownerIdstring · uuidownerIdsstring[] · uuidкількість ≤ 100
phonestringдовжина ≤ 100
qstringдовжина ≤ 200
sortstringЗначення:
name-namecompany-companyowner-ownercreatedAt-createdAtupdatedAt-updatedAtstageIdsstring[] · uuidкількість ≤ 100
tagIdsstring[] · uuidкількість ≤ 50
tagModestringтипово
anyЗначення:
anyallnonetasksstring[]кількість ≤ 3
Значення:
noneopenoverdueupdatedFromstring · date-timeupdatedTostring · date-time
Приклад запиту
curl 'https://your-company.altahub.ai/api/v1/contacts' \
-H 'Authorization: Bearer alta_…'const response = await fetch('https://your-company.altahub.ai/api/v1/contacts', {
method: 'GET',
headers: {
Authorization: 'Bearer alta_…',
},
});
const data = await response.json();import requests
response = requests.get(
"https://your-company.altahub.ai/api/v1/contacts",
headers={"Authorization": "Bearer alta_…"},
)
data = response.json()<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://your-company.altahub.ai/api/v1/contacts', [
'headers' => ['Authorization' => 'Bearer alta_…'],
]);
$data = json_decode((string) $response->getBody(), true);Відповідь 200
Успішна відповідь.
{
"items": [
{
"id": "0192f3a1-7c2e-7b4d-9a61-00000000000a",
"firstName": "Олена",
"lastName": "Коваль",
"fullName": "Олена Коваль",
"jobTitle": "Менеджерка із закупівель",
"phone": "+380501234567",
"email": "olena.koval@kavova.ua",
"phones": [
{
"value": "+380501234567",
"kind": "mobile"
}
],
"emails": [
{
"value": "olena.koval@kavova.ua",
"kind": "work"
}
],
"source": "Сайт",
"notes": "Зручніше писати в Telegram",
"company": {
"id": "0192f3a1-7c2e-7b4d-9a61-00000000000b",
"name": "ТОВ «Кавова гільдія»"
},
"owner": {
"id": "0192f3a1-7c2e-7b4d-9a61-000000000002",
"name": "Ірина Мельник"
},
"tags": [
{
"id": "0192f3a1-7c2e-7b4d-9a61-000000000028",
"name": "VIP",
"color": "purple"
}
],
"customFields": [],
"archivedAt": null,
"createdAt": "2026-10-20T08:15:00Z",
"updatedAt": "2026-10-24T16:45:00Z",
"version": 2
}
],
"nextCursor": null
}Поля відповіді
itemsobject[]Вкладені поля: 19
archivedAtstring · date-time | nullcompanyobject | nullВкладені поля: 2
idstring · uuidnamestring
createdAtstring · date-timecustomFieldsobject[]Вкладені поля: 3
fieldIdstring · uuidvaluestring | boolean | string[] · uuid | objectВаріант 1 · string
string
Варіант 2 · boolean
boolean
Варіант 3 · string[] · uuid
string[] · uuid
Варіант 4 · object
amountstringcurrencystring
Варіант 5 · object
citystringcountrystringlinestringpostcodestring
values(string | object)[]Варіант 1 · string
string
Варіант 2 · object
citystringcountrystringlinestringpostcodestring
emailstring | nullThe main e-mail address: the first of emails
emailsobject[]Every e-mail address with its kind, the main one first
Вкладені поля: 2
kindstringЗначення:
workpersonalothervaluestring
firstNamestringfullNamestringidstring · uuidjobTitlestring | nulllastNamestring"" when the contact has only a first name
notesstring | nullownerobject | nullВкладені поля: 2
idstring · uuidnamestring
phonestring | nullThe main phone number: the first of phones
phonesobject[]Every phone number with its kind, the main one first
Вкладені поля: 2
kindstringЗначення:
mobileworkhomeothervaluestring
sourcestring | nulltagsobject[]Вкладені поля: 3
colorstringЗначення:
graybluetealgreenyelloworangeredpurpleidstring · uuidnamestring
updatedAtstring · date-timeversioninteger≥ 1
nextCursorstring | null
Створити контакт
POST /contacts
Потрібне лише ім’я. Без відповідального (ownerId) контакт дістається тому, хто створює, для ключа — його автору (у контакта завжди є відповідальний: ownerId: null — 400 owner_required). Повтор запиту створить другий контакт: якщо відповідь не прийшла, спершу пошукайте контакт за телефоном чи поштою.
Тіло запиту
firstNamestring обов’язководовжина 1–100 · шаблон
\ScompanyIdstring · uuid | nullcustomFieldsobject[]кількість ≤ 100
Вкладені поля: 3
fieldIdstring · uuid обов’язковоvaluestring | boolean | string[] · uuid | object | nullВаріант 1 · string
string
Варіант 2 · boolean
boolean
Варіант 3 · string[] · uuid
string[] · uuid
Варіант 4 · object
amountstring обов’язководовжина ≤ 40
currencystring обов’язководовжина ≤ 3
Варіант 5 · object
citystring | nullдовжина ≤ 200
countrystring | nullдовжина ≤ 200
linestring | nullдовжина ≤ 600
postcodestring | nullдовжина ≤ 40
values(string | object)[]кількість ≤ 50
Варіант 1 · string
string
Варіант 2 · object
citystring | nullдовжина ≤ 200
countrystring | nullдовжина ≤ 200
linestring | nullдовжина ≤ 600
postcodestring | nullдовжина ≤ 40
emailstring | nullдовжина ≤ 254
emailsobject[]Every e-mail address with its kind (work, personal, other), the main one first; [] removes them all
кількість ≤ 100
Вкладені поля: 2
kindstring обов’язковоЗначення:
workpersonalothervaluestring обов’язководовжина ≤ 254
jobTitlestring | nullдовжина ≤ 100
lastNamestring | nullдовжина ≤ 100
notesstring | nullдовжина ≤ 5000
ownerIdstring · uuid | nullphonestring | nullдовжина ≤ 50
phonesobject[]Every phone number with its kind (mobile, work, home, other), the main one first; [] removes them all
кількість ≤ 100
Вкладені поля: 2
kindstring обов’язковоЗначення:
mobileworkhomeothervaluestring обов’язководовжина ≤ 50
sourcestring | nullдовжина ≤ 100
tagIdsstring[] · uuidкількість ≤ 50
Приклад запиту
curl -X POST 'https://your-company.altahub.ai/api/v1/contacts' \
-H 'Authorization: Bearer alta_…' \
-H 'Content-Type: application/json' \
-d '{
"firstName": "Олена",
"lastName": "Коваль",
"phone": "+380501234567",
"email": "olena.koval@kavova.ua",
"source": "Сайт"
}'const response = await fetch('https://your-company.altahub.ai/api/v1/contacts', {
method: 'POST',
headers: {
Authorization: 'Bearer alta_…',
'Content-Type': 'application/json',
},
body: JSON.stringify({
firstName: 'Олена',
lastName: 'Коваль',
phone: '+380501234567',
email: 'olena.koval@kavova.ua',
source: 'Сайт',
}),
});
const data = await response.json();import requests
response = requests.post(
"https://your-company.altahub.ai/api/v1/contacts",
headers={"Authorization": "Bearer alta_…"},
json={
"firstName": "Олена",
"lastName": "Коваль",
"phone": "+380501234567",
"email": "olena.koval@kavova.ua",
"source": "Сайт",
},
)
data = response.json()<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://your-company.altahub.ai/api/v1/contacts', [
'headers' => ['Authorization' => 'Bearer alta_…'],
'json' => [
'firstName' => 'Олена',
'lastName' => 'Коваль',
'phone' => '+380501234567',
'email' => 'olena.koval@kavova.ua',
'source' => 'Сайт',
],
]);
$data = json_decode((string) $response->getBody(), true);Відповідь 201
Успішна відповідь.
{
"id": "0192f3a1-7c2e-7b4d-9a61-00000000000a",
"firstName": "Олена",
"lastName": "Коваль",
"fullName": "Олена Коваль",
"jobTitle": null,
"phone": "+380501234567",
"email": "olena.koval@kavova.ua",
"phones": [
{
"value": "+380501234567",
"kind": "mobile"
}
],
"emails": [
{
"value": "olena.koval@kavova.ua",
"kind": "work"
}
],
"source": "Сайт",
"notes": null,
"company": null,
"owner": {
"id": "0192f3a1-7c2e-7b4d-9a61-000000000001",
"name": "Андрій Шевченко"
},
"tags": [],
"customFields": [],
"archivedAt": null,
"createdAt": "2026-10-20T08:15:00Z",
"updatedAt": "2026-10-20T08:15:00Z",
"version": 1
}Поля відповіді
archivedAtstring · date-time | nullcompanyobject | nullВкладені поля: 2
idstring · uuidnamestring
createdAtstring · date-timecustomFieldsobject[]Вкладені поля: 3
fieldIdstring · uuidvaluestring | boolean | string[] · uuid | objectВаріант 1 · string
string
Варіант 2 · boolean
boolean
Варіант 3 · string[] · uuid
string[] · uuid
Варіант 4 · object
amountstringcurrencystring
Варіант 5 · object
citystringcountrystringlinestringpostcodestring
values(string | object)[]Варіант 1 · string
string
Варіант 2 · object
citystringcountrystringlinestringpostcodestring
emailstring | nullThe main e-mail address: the first of emails
emailsobject[]Every e-mail address with its kind, the main one first
Вкладені поля: 2
kindstringЗначення:
workpersonalothervaluestring
firstNamestringfullNamestringidstring · uuidjobTitlestring | nulllastNamestring"" when the contact has only a first name
notesstring | nullownerobject | nullВкладені поля: 2
idstring · uuidnamestring
phonestring | nullThe main phone number: the first of phones
phonesobject[]Every phone number with its kind, the main one first
Вкладені поля: 2
kindstringЗначення:
mobileworkhomeothervaluestring
sourcestring | nulltagsobject[]Вкладені поля: 3
colorstringЗначення:
graybluetealgreenyelloworangeredpurpleidstring · uuidnamestring
updatedAtstring · date-timeversioninteger≥ 1
Отримати контакт
GET /contacts/{contactId}
Один контакт за id.
Параметри шляху
contactIdstring · uuid обов’язково
Приклад запиту
curl 'https://your-company.altahub.ai/api/v1/contacts/{contactId}' \
-H 'Authorization: Bearer alta_…'const response = await fetch('https://your-company.altahub.ai/api/v1/contacts/{contactId}', {
method: 'GET',
headers: {
Authorization: 'Bearer alta_…',
},
});
const data = await response.json();import requests
response = requests.get(
"https://your-company.altahub.ai/api/v1/contacts/{contactId}",
headers={"Authorization": "Bearer alta_…"},
)
data = response.json()<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://your-company.altahub.ai/api/v1/contacts/{contactId}', [
'headers' => ['Authorization' => 'Bearer alta_…'],
]);
$data = json_decode((string) $response->getBody(), true);Відповідь 200
Успішна відповідь.
{
"id": "0192f3a1-7c2e-7b4d-9a61-00000000000a",
"firstName": "Олена",
"lastName": "Коваль",
"fullName": "Олена Коваль",
"jobTitle": "Менеджерка із закупівель",
"phone": "+380501234567",
"email": "olena.koval@kavova.ua",
"phones": [
{
"value": "+380501234567",
"kind": "mobile"
}
],
"emails": [
{
"value": "olena.koval@kavova.ua",
"kind": "work"
}
],
"source": "Сайт",
"notes": "Зручніше писати в Telegram",
"company": {
"id": "0192f3a1-7c2e-7b4d-9a61-00000000000b",
"name": "ТОВ «Кавова гільдія»"
},
"owner": {
"id": "0192f3a1-7c2e-7b4d-9a61-000000000002",
"name": "Ірина Мельник"
},
"tags": [
{
"id": "0192f3a1-7c2e-7b4d-9a61-000000000028",
"name": "VIP",
"color": "purple"
}
],
"customFields": [],
"archivedAt": null,
"createdAt": "2026-10-20T08:15:00Z",
"updatedAt": "2026-10-24T16:45:00Z",
"version": 2
}Поля — як у відповіді Створити контакт
Змінити контакт
PATCH /contacts/{contactId}
Передайте лише те, що змінюється; version необов’язковий: з ним зміна пройде, лише якщо запис не змінили після вашого читання (інакше 409 CONFLICT). ownerId передає контакт іншому співробітнику; прибрати відповідального не можна: ownerId: null — 400 owner_required (без ownerId відповідальний лишається колишнім).
Параметри шляху
contactIdstring · uuid обов’язково
Тіло запиту
companyIdstring · uuid | nullcustomFieldsobject[]кількість ≤ 100
Вкладені поля: 3
fieldIdstring · uuid обов’язковоvaluestring | boolean | string[] · uuid | object | nullВаріант 1 · string
string
Варіант 2 · boolean
boolean
Варіант 3 · string[] · uuid
string[] · uuid
Варіант 4 · object
amountstring обов’язководовжина ≤ 40
currencystring обов’язководовжина ≤ 3
Варіант 5 · object
citystring | nullдовжина ≤ 200
countrystring | nullдовжина ≤ 200
linestring | nullдовжина ≤ 600
postcodestring | nullдовжина ≤ 40
values(string | object)[]кількість ≤ 50
Варіант 1 · string
string
Варіант 2 · object
citystring | nullдовжина ≤ 200
countrystring | nullдовжина ≤ 200
linestring | nullдовжина ≤ 600
postcodestring | nullдовжина ≤ 40
emailstring | nullдовжина ≤ 254
emailsobject[]Every e-mail address with its kind (work, personal, other), the main one first; [] removes them all
кількість ≤ 100
Вкладені поля: 2
kindstring обов’язковоЗначення:
workpersonalothervaluestring обов’язководовжина ≤ 254
firstNamestringдовжина 1–100 · шаблон
\SjobTitlestring | nullдовжина ≤ 100
lastNamestring | nullдовжина ≤ 100
notesstring | nullдовжина ≤ 5000
ownerIdstring · uuid | nullphonestring | nullдовжина ≤ 50
phonesobject[]Every phone number with its kind (mobile, work, home, other), the main one first; [] removes them all
кількість ≤ 100
Вкладені поля: 2
kindstring обов’язковоЗначення:
mobileworkhomeothervaluestring обов’язководовжина ≤ 50
sourcestring | nullдовжина ≤ 100
tagIdsstring[] · uuidкількість ≤ 50
versioninteger≥ 1
Приклад запиту
curl -X PATCH 'https://your-company.altahub.ai/api/v1/contacts/{contactId}' \
-H 'Authorization: Bearer alta_…' \
-H 'Content-Type: application/json' \
-d '{
"jobTitle": "Менеджерка із закупівель",
"companyId": "0192f3a1-7c2e-7b4d-9a61-00000000000b"
}'const response = await fetch('https://your-company.altahub.ai/api/v1/contacts/{contactId}', {
method: 'PATCH',
headers: {
Authorization: 'Bearer alta_…',
'Content-Type': 'application/json',
},
body: JSON.stringify({
jobTitle: 'Менеджерка із закупівель',
companyId: '0192f3a1-7c2e-7b4d-9a61-00000000000b',
}),
});
const data = await response.json();import requests
response = requests.patch(
"https://your-company.altahub.ai/api/v1/contacts/{contactId}",
headers={"Authorization": "Bearer alta_…"},
json={
"jobTitle": "Менеджерка із закупівель",
"companyId": "0192f3a1-7c2e-7b4d-9a61-00000000000b",
},
)
data = response.json()<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('PATCH', 'https://your-company.altahub.ai/api/v1/contacts/{contactId}', [
'headers' => ['Authorization' => 'Bearer alta_…'],
'json' => [
'jobTitle' => 'Менеджерка із закупівель',
'companyId' => '0192f3a1-7c2e-7b4d-9a61-00000000000b',
],
]);
$data = json_decode((string) $response->getBody(), true);Відповідь 200
Успішна відповідь.
{
"id": "0192f3a1-7c2e-7b4d-9a61-00000000000a",
"firstName": "Олена",
"lastName": "Коваль",
"fullName": "Олена Коваль",
"jobTitle": "Менеджерка із закупівель",
"phone": "+380501234567",
"email": "olena.koval@kavova.ua",
"phones": [
{
"value": "+380501234567",
"kind": "mobile"
}
],
"emails": [
{
"value": "olena.koval@kavova.ua",
"kind": "work"
}
],
"source": "Сайт",
"notes": "Зручніше писати в Telegram",
"company": {
"id": "0192f3a1-7c2e-7b4d-9a61-00000000000b",
"name": "ТОВ «Кавова гільдія»"
},
"owner": {
"id": "0192f3a1-7c2e-7b4d-9a61-000000000002",
"name": "Ірина Мельник"
},
"tags": [
{
"id": "0192f3a1-7c2e-7b4d-9a61-000000000028",
"name": "VIP",
"color": "purple"
}
],
"customFields": [],
"archivedAt": null,
"createdAt": "2026-10-20T08:15:00Z",
"updatedAt": "2026-10-24T16:45:00Z",
"version": 3
}Поля — як у відповіді Створити контакт
Прибрати контакт в архів
POST /contacts/{contactId}/archive
Контакт зникає зі списків (видно з archived=true). Повтор нічого не змінює.
Параметри шляху
contactIdstring · uuid обов’язково
Приклад запиту
curl -X POST 'https://your-company.altahub.ai/api/v1/contacts/{contactId}/archive' \
-H 'Authorization: Bearer alta_…' \
-H 'Content-Type: application/json' \
-d '{}'const response = await fetch('https://your-company.altahub.ai/api/v1/contacts/{contactId}/archive', {
method: 'POST',
headers: {
Authorization: 'Bearer alta_…',
'Content-Type': 'application/json',
},
body: JSON.stringify({}),
});
const data = await response.json();import requests
response = requests.post(
"https://your-company.altahub.ai/api/v1/contacts/{contactId}/archive",
headers={"Authorization": "Bearer alta_…"},
json={},
)
data = response.json()<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://your-company.altahub.ai/api/v1/contacts/{contactId}/archive', [
'headers' => ['Authorization' => 'Bearer alta_…'],
'json' => new \stdClass(),
]);
$data = json_decode((string) $response->getBody(), true);Відповідь 200
Успішна відповідь.
{
"id": "0192f3a1-7c2e-7b4d-9a61-00000000000a",
"firstName": "Олена",
"lastName": "Коваль",
"fullName": "Олена Коваль",
"jobTitle": "Менеджерка із закупівель",
"phone": "+380501234567",
"email": "olena.koval@kavova.ua",
"phones": [
{
"value": "+380501234567",
"kind": "mobile"
}
],
"emails": [
{
"value": "olena.koval@kavova.ua",
"kind": "work"
}
],
"source": "Сайт",
"notes": "Зручніше писати в Telegram",
"company": {
"id": "0192f3a1-7c2e-7b4d-9a61-00000000000b",
"name": "ТОВ «Кавова гільдія»"
},
"owner": {
"id": "0192f3a1-7c2e-7b4d-9a61-000000000002",
"name": "Ірина Мельник"
},
"tags": [
{
"id": "0192f3a1-7c2e-7b4d-9a61-000000000028",
"name": "VIP",
"color": "purple"
}
],
"customFields": [],
"archivedAt": "2026-10-24T16:45:00Z",
"createdAt": "2026-10-20T08:15:00Z",
"updatedAt": "2026-10-24T16:45:00Z",
"version": 3
}Поля — як у відповіді Створити контакт
Повернути контакт з архіву
POST /contacts/{contactId}/restore
Контакт знову в списках. Повтор нічого не змінює.
Параметри шляху
contactIdstring · uuid обов’язково
Приклад запиту
curl -X POST 'https://your-company.altahub.ai/api/v1/contacts/{contactId}/restore' \
-H 'Authorization: Bearer alta_…' \
-H 'Content-Type: application/json' \
-d '{}'const response = await fetch('https://your-company.altahub.ai/api/v1/contacts/{contactId}/restore', {
method: 'POST',
headers: {
Authorization: 'Bearer alta_…',
'Content-Type': 'application/json',
},
body: JSON.stringify({}),
});
const data = await response.json();import requests
response = requests.post(
"https://your-company.altahub.ai/api/v1/contacts/{contactId}/restore",
headers={"Authorization": "Bearer alta_…"},
json={},
)
data = response.json()<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://your-company.altahub.ai/api/v1/contacts/{contactId}/restore', [
'headers' => ['Authorization' => 'Bearer alta_…'],
'json' => new \stdClass(),
]);
$data = json_decode((string) $response->getBody(), true);Відповідь 200
Успішна відповідь.
{
"id": "0192f3a1-7c2e-7b4d-9a61-00000000000a",
"firstName": "Олена",
"lastName": "Коваль",
"fullName": "Олена Коваль",
"jobTitle": "Менеджерка із закупівель",
"phone": "+380501234567",
"email": "olena.koval@kavova.ua",
"phones": [
{
"value": "+380501234567",
"kind": "mobile"
}
],
"emails": [
{
"value": "olena.koval@kavova.ua",
"kind": "work"
}
],
"source": "Сайт",
"notes": "Зручніше писати в Telegram",
"company": {
"id": "0192f3a1-7c2e-7b4d-9a61-00000000000b",
"name": "ТОВ «Кавова гільдія»"
},
"owner": {
"id": "0192f3a1-7c2e-7b4d-9a61-000000000002",
"name": "Ірина Мельник"
},
"tags": [
{
"id": "0192f3a1-7c2e-7b4d-9a61-000000000028",
"name": "VIP",
"color": "purple"
}
],
"customFields": [],
"archivedAt": null,
"createdAt": "2026-10-20T08:15:00Z",
"updatedAt": "2026-10-24T16:45:00Z",
"version": 4
}Поля — як у відповіді Створити контакт
Створити або оновити контакт за зовнішнім id
PUT /contacts/external/{source}/{externalId}
Один контакт на один id у вашій системі: source — ваше слово для системи (малі латинські літери, цифри, - і _), externalId — id контакту там. Такого контакту ще немає — він створюється (created), є — приводиться до запиту (updated); той самий запит ще раз нічого не змінює (unchanged), тому повтор безпечний. Імпорт з іншої системи записує її контакти так само: з його source і тим самим id це той самий контакт, а не другий. Запит описує контакт цілком: поле, якого в ньому немає, очищається (без ownerId у контакту немає відповідального); з власних полів змінюються лише передані в customFields, а tagIds, якщо передано, — повний набір тегів. createdAt і updatedAt — коли контакт створили й востаннє змінювали у вашій системі. З ifUnchangedHere: true контакт, який в Alta змінили після останнього запису за цим id, лишається як є, а у відповіді — changedHere: true. Якщо контакт з цим id об’єднали з іншим, відповідь називає той контакт (merged: true), другий не створюється. Два запити з одним новим id одночасно: другий отримує 409 CONFLICT, його можна повторити. Потрібне право «Імпорт даних» у ролі автора ключа (у власника й адміністратора воно є), інакше — 403 FORBIDDEN.
Параметри шляху
externalIdstring обов’язководовжина 1–200 · шаблон
^\S+$sourcestring обов’язковошаблон
^[a-z0-9_-]{1,40}$
Тіло запиту
createdAtstring · date-time обов’язковоfirstNamestring обов’язководовжина 1–100 · шаблон
\SupdatedAtstring · date-time обов’язковоcompanyIdstring · uuid | nullcustomFieldsobject[]кількість ≤ 100
Вкладені поля: 3
fieldIdstring · uuid обов’язковоvaluestring | boolean | string[] · uuid | object | nullВаріант 1 · string
string
Варіант 2 · boolean
boolean
Варіант 3 · string[] · uuid
string[] · uuid
Варіант 4 · object
amountstring обов’язководовжина ≤ 40
currencystring обов’язководовжина ≤ 3
Варіант 5 · object
citystring | nullдовжина ≤ 200
countrystring | nullдовжина ≤ 200
linestring | nullдовжина ≤ 600
postcodestring | nullдовжина ≤ 40
values(string | object)[]кількість ≤ 50
Варіант 1 · string
string
Варіант 2 · object
citystring | nullдовжина ≤ 200
countrystring | nullдовжина ≤ 200
linestring | nullдовжина ≤ 600
postcodestring | nullдовжина ≤ 40
emailstring | nullдовжина ≤ 254
ifUnchangedHerebooleanjobTitlestring | nullдовжина ≤ 100
lastNamestring | nullдовжина ≤ 100
notesstring | nullдовжина ≤ 5000
ownerIdstring · uuid | nullphonestring | nullдовжина ≤ 50
sourcestring | nullдовжина ≤ 100
tagIdsstring[] · uuidкількість ≤ 50
Приклад запиту
curl -X PUT 'https://your-company.altahub.ai/api/v1/contacts/external/{source}/{externalId}' \
-H 'Authorization: Bearer alta_…' \
-H 'Content-Type: application/json' \
-d '{
"firstName": "Олена",
"lastName": "Коваль",
"phone": "+380501234567",
"email": "olena.koval@kavova.ua",
"source": "Сайт",
"createdAt": "2026-10-20T08:15:00Z",
"updatedAt": "2026-10-20T08:15:00Z"
}'const response = await fetch('https://your-company.altahub.ai/api/v1/contacts/external/{source}/{externalId}', {
method: 'PUT',
headers: {
Authorization: 'Bearer alta_…',
'Content-Type': 'application/json',
},
body: JSON.stringify({
firstName: 'Олена',
lastName: 'Коваль',
phone: '+380501234567',
email: 'olena.koval@kavova.ua',
source: 'Сайт',
createdAt: '2026-10-20T08:15:00Z',
updatedAt: '2026-10-20T08:15:00Z',
}),
});
const data = await response.json();import requests
response = requests.put(
"https://your-company.altahub.ai/api/v1/contacts/external/{source}/{externalId}",
headers={"Authorization": "Bearer alta_…"},
json={
"firstName": "Олена",
"lastName": "Коваль",
"phone": "+380501234567",
"email": "olena.koval@kavova.ua",
"source": "Сайт",
"createdAt": "2026-10-20T08:15:00Z",
"updatedAt": "2026-10-20T08:15:00Z",
},
)
data = response.json()<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('PUT', 'https://your-company.altahub.ai/api/v1/contacts/external/{source}/{externalId}', [
'headers' => ['Authorization' => 'Bearer alta_…'],
'json' => [
'firstName' => 'Олена',
'lastName' => 'Коваль',
'phone' => '+380501234567',
'email' => 'olena.koval@kavova.ua',
'source' => 'Сайт',
'createdAt' => '2026-10-20T08:15:00Z',
'updatedAt' => '2026-10-20T08:15:00Z',
],
]);
$data = json_decode((string) $response->getBody(), true);Відповідь 200
Успішна відповідь.
{
"id": "0192f3a1-7c2e-7b4d-9a61-00000000000a",
"outcome": "created"
}Поля відповіді
idstring · uuidoutcomestringЗначення:
createdupdatedunchangedchangedHerebooleanЗначення:
truedeclinedbooleanЗначення:
truemergedbooleanЗначення:
truesameAsImportedbooleanЗначення:
true