AISARAISAR
Все вебхуки

Контакты

Контакт создан

contact.created

Отправляется при создании нового контакта. Обратите внимание: в payload этого события имена полей контакта в camelCase, а поле со списком email называется emailes.

HTTP-запрос

AISAR отправляет подписанный POST-запрос на ваш webhook_url:

http
POST {webhook_url}
Content-Type: application/json
X-AISAR-Signature: sha256=...

{
  "event": "contact.created",
  "event_id": "evt_01JXXXXXXXXXXXXXXXXXXXXX",
  "timestamp": "2026-03-26T12:00:00.000000Z",
  "company_id": 1,
  "data": {
    "contact": {
      "id": 10,
      "company_id": 1,
      "displayName": "John Doe",
      "firstName": "John",
      "lastName": "Doe",
      "secondName": null,
      "salutation": null,
      "title": null,
      "company": null,
      "status": "lead",
      "photo": null,
      "comments": null,
      "phones": [{ "phone": "+77001234567", "type": "mobile" }],
      "emailes": [{ "email": "john@example.com", "type": "work" }],
      "contactAccounts": [],
      "tags": [],
      "created_at": "2026-03-26T12:00:00.000000Z",
      "updated_at": "2026-03-26T12:00:00.000000Z"
    }
  }
}

Заголовок X-AISAR-Signature содержит HMAC-SHA256 подпись тела запроса — используйте её, чтобы убедиться, что запрос пришёл от AISAR.

Пример payload

json
{
  "event": "contact.created",
  "event_id": "evt_01JXXXXXXXXXXXXXXXXXXXXX",
  "timestamp": "2026-03-26T12:00:00.000000Z",
  "company_id": 1,
  "data": {
    "contact": {
      "id": 10,
      "company_id": 1,
      "displayName": "John Doe",
      "firstName": "John",
      "lastName": "Doe",
      "secondName": null,
      "salutation": null,
      "title": null,
      "company": null,
      "status": "lead",
      "photo": null,
      "comments": null,
      "phones": [{ "phone": "+77001234567", "type": "mobile" }],
      "emailes": [{ "email": "john@example.com", "type": "work" }],
      "contactAccounts": [],
      "tags": [],
      "created_at": "2026-03-26T12:00:00.000000Z",
      "updated_at": "2026-03-26T12:00:00.000000Z"
    }
  }
}

Поля payload

ПолеТипОписание
contact.idintegerВнутренний ID контакта
contact.displayNamestring|nullОтображаемое имя контакта
contact.firstNamestring|nullИмя
contact.lastNamestring|nullФамилия
contact.statusstringlead или customer
contact.phonesarrayТелефоны — объекты с полями phone и type
contact.emailesarrayEmail-адреса — объекты с полями email и type (обратите внимание: поле называется emailes)
contact.contactAccountsarrayПривязанные платформенные аккаунты
contact.tagsarrayТеги, назначенные контакту