LeadEventDTO
One change recorded on the lead itself or on one of its contacts — the event
payload of a LeadEventJournalDTO with dataType: LEAD_EVENT or CONTACT_EVENT.
The meaning of previous / current / objectId depends on actionType; the
most common combinations:
actionType | previous | current | objectId |
|---|---|---|---|
CHANGE_STATUS | old pipeStatusId | new pipeStatusId | — |
CREATE_STATUS | — | pipeStatusId | — |
SET_VALUE / CHANGE_VALUE / DELETE_VALUE | old value | new value | CRM field ID |
CHANGE_LEAD_EMPLOYEE | old employee ID | new employee ID | — |
SET_LEAD_EMPLOYEE | — | employee ID | — |
SET_ / CHANGE_ / REMOVE_CONTACT_RESPONSIBLE | old employee ID | new employee ID | — |
ATTACH_LEAD_TO_CONTRACT | — | contract number | contract ID |
REMOVE_LEAD_FROM_CONTRACT | contract number | — | contract ID |
ATTACH_LEAD_TO_CLIENT | — | client name | client ID |
REMOVE_CLIENT_FROM_LEAD | client name | — | client ID |
CALL_EVALUATED / CALL_EVALUATE_DELETED | — | — | note ID |
META_CONVERSION | — | Success / Failed | — |
CHANGE_LEAD_NAME | old name | new name | — |
CREATE_TAG / REMOVE_TAG | removed tag name | added tag name | — |
CREATE_REASONS_FOR_REFUSAL | — | reason text | — |
CHANGE_REASONS_FOR_REFUSAL | old reason text | new reason text | — |
ATTACH_FLAT | — | flat number | flat ID |
LEAD_MERGE / COPY_LEAD / COPY_LEAD_FROM | — | the other lead's name | the other lead's ID |
⚠️ Even where a value above is an ID, it is sent as a string and is not
resolved to a name — look it up via GET /v1/open-api/pipe/all,
GET /v1/open-api/crm-field or POST /v1/open-api/employee/filter.
Four families of actions are the exception — they carry a resolved object next to the raw value:
actionType | extra fields | what the raw value is |
|---|---|---|
CHANGE_STATUS, CREATE_STATUS | previousPipeStatus / currentPipeStatus | pipeline stage ID |
CHANGE_LEAD_EMPLOYEE, SET_LEAD_EMPLOYEE | previousEmployee / currentEmployee | employee ID |
CREATE_TAG, REMOVE_TAG | previousTag / currentTag | tag name |
CREATE_REASONS_FOR_REFUSAL, CHANGE_REASONS_FOR_REFUSAL | previousReason / currentReason | reason text |
SET_VALUE, CHANGE_VALUE, DELETE_VALUE | crmField (+ previousAddress / currentAddress) | objectId — field ID |
ATTACH_LEAD_TO_CLIENT, REMOVE_CLIENT_FROM_LEAD | client | objectId — client ID |
LEAD_MERGE, COPY_LEAD, COPY_LEAD_FROM | relatedLead | objectId — the other lead's ID |
ATTACH_LEAD_TO_CONTRACT, REMOVE_LEAD_FROM_CONTRACT | contract | objectId — contract ID |
ATTACH_FLAT | flat | objectId — apartment ID |
CALL_EVALUATED, CALL_EVALUATE_DELETED | callNote | objectId — note ID |
The contact-responsible actions (SET_CONTACT_RESPONSIBLE,
CHANGE_CONTACT_RESPONSIBLE, REMOVE_CONTACT_RESPONSIBLE) also store an employee
ID and come back with previousEmployee / currentEmployee, exactly like the
lead's own responsible employee.
The reasons differ: "previous": "603", "current": "979" says nothing on its own,
while a tag name or a reason text is already readable — there the resolved object
adds the ID, colour and ordering, so a timeline can be grouped by stage, tag or
reason ID.
Only the applicable side is filled: CREATE_STATUS, SET_LEAD_EMPLOYEE,
CREATE_TAG and CREATE_REASONS_FOR_REFUSAL have no previous value, REMOVE_TAG
has only a previous one. The raw fields are unchanged, so existing integrations
keep working.
⚠️ Tags and reasons are resolved by name/text — the history does not store
their IDs. A tag that was deleted, or a reason removed from the reference list or
edited since, will not be found; the object is then omitted entirely and only the
raw value remains. The same rule applies to an employee who was deleted or belongs
to another company, and to a deleted custom field. Pipeline stages are resolved by
ID and a deleted stage is still returned (with deletedTimestamp set), since older
history routinely points at stages that no longer exist.
⚠️ client and relatedLead are not read back from the database: both values
already sit in the event (objectId and current / previous), so the name is
the one the object had at the time of the event. They repackage what the raw
fields already say — fetch the object by id for its current state.
ID of the underlying lead_event row — same value as the enclosing record's eventId.
918233Lead this event belongs to.
26801That lead's name — omitted when the lead has been deleted. Saves resolving leadId yourself in company-wide history.
Yunusobod 3/45 — AlisherThe kind of change a LeadEventDTO record represents. See LeadEventDTO for how
previous / current / objectId are interpreted per value.
Possible values: [CREATE_LED, CREATE_CONTACT, CREATE_TAG, REMOVE_TAG, CHANGE_STATUS, CREATE_STATUS, CHANGE_VALUE, SET_VALUE, DELETE_VALUE, CHANGE_LEAD_NAME, CHANGE_LEAD_BALANCE, CHANGE_LEAD_EMPLOYEE, SET_LEAD_EMPLOYEE, CHANGE_CONTACT_NAME, CREATE_CONTACT_EMAIL, CHANGE_CONTACT_EMAIL, SET_CONTACT_RESPONSIBLE, CHANGE_CONTACT_RESPONSIBLE, REMOVE_CONTACT_PHONE, CREATE_CONTACT_PHONE, CREATE_REASONS_FOR_REFUSAL, CHANGE_REASONS_FOR_REFUSAL, REMOVE_CONTACT, RESTORE_CONTACT, DELETE_LEAD, RECOVERY_LEAD, LEAD_MERGE, ATTACH_LEAD_TO_CLIENT, REMOVE_CLIENT_FROM_LEAD, CREATE_TASK, TASK_COMPLETED, TASK_RESULT_ADDED, TASK_TEXT_CHANGED, DELETE_TASK, CALL_BROJECT, ATTACH_FLAT, CALL_EVALUATED, CALL_EVALUATE_DELETED, META_CONVERSION, ATTACH_LEAD_TO_CONTRACT, REMOVE_LEAD_FROM_CONTRACT, REMOVE_CONTACT_RESPONSIBLE, UNLINK_CONTACT_FROM_LEAD, LINK_CONTACT_TO_LEAD, COPY_LEAD, COPY_LEAD_FROM]
CHANGE_STATUSWhat changed: LEAD — the lead itself, CONTACT — one of its contacts.
Possible values: [CONTACT, LEAD, CONTRACT, TASK, BOOKING, ALL, CLIENT]
LEADEvent time
1735689600createdEmployee object
The employee who performed the action — ID and full name.
Employee ID
201Employee full name
David WilsonWhen objectLog = CONTACT — the changed contact's ID.
5124When objectLog = CONTACT — the changed contact's name.
Dilnoza RustamovaPrevious value; absent for add-only actions.
3New value; absent for remove-only actions.
5ID of the object the change relates to (e.g. a CRM field ID).
172crmField object
Which lead custom field changed, resolved from the field ID in objectId —
present for SET_VALUE, CHANGE_VALUE and DELETE_VALUE. A field that was
deleted is not resolved; only the raw objectId remains.
Field ID
172Field name
ByudjetCRM field type enum.
Possible values: [TEXT, DATE, SELECT, MULTI_SELECT, URL, TOGGLE_SWITCH, RADIO, LOCATION, COUNTER, ADDRESS, EXTENDED_TEXT, EMPLOYEE, FILE, NUMBER]
SELECTpreviousAddress object
The previous address, present only when crmField.type = ADDRESS. Such a
field stores "<uuid>||street" (or just "<uuid>") in previous / current,
which is unreadable on its own — here it is expanded to country / city /
district / street. Omitted when the address cannot be resolved.
country object
A country in the address reference data.
Country ID
1The country's time zone.
Asia/TashkentName (uz)
O'zbekistonName (ru)
УзбекистанName (en)
UzbekistanName (uz-cyrl)
ЎзбекистонName (tr)
ÖzbekistanName (tj)
ӮзбекистонName (ky)
Өзбекстанcity object
A city in the address reference data.
City ID
14City UUID — the value stored in an ADDRESS field.
0f4c1a2e-8b7d-4a11-9f3c-2d5e6a7b8c90Name (uz)
ToshkentName (ru)
ТашкентName (en)
TashkentName (uz-cyrl)
ТошкентName (tr)
TaşkentName (tj)
ТошкандName (ky)
Ташкентdistrict object
A district in the address reference data.
District ID
207District UUID — the value stored in an ADDRESS field.
3b9ac1de-52f4-4d7a-9c18-7e0b5f2a4d63Name (uz)
YunusobodName (ru)
ЮнусабадName (en)
YunusabadName (uz-cyrl)
ЮнусободName (tr)
YunusabadName (tj)
ЮнусободName (ky)
ЮнусабадStreet
Amir Temur ko'chasi 12currentAddress object
The new address, same rules as previousAddress.
country object
A country in the address reference data.
Country ID
1The country's time zone.
Asia/TashkentName (uz)
O'zbekistonName (ru)
УзбекистанName (en)
UzbekistanName (uz-cyrl)
ЎзбекистонName (tr)
ÖzbekistanName (tj)
ӮзбекистонName (ky)
Өзбекстанcity object
A city in the address reference data.
City ID
14City UUID — the value stored in an ADDRESS field.
0f4c1a2e-8b7d-4a11-9f3c-2d5e6a7b8c90Name (uz)
ToshkentName (ru)
ТашкентName (en)
TashkentName (uz-cyrl)
ТошкентName (tr)
TaşkentName (tj)
ТошкандName (ky)
Ташкентdistrict object
A district in the address reference data.
District ID
207District UUID — the value stored in an ADDRESS field.
3b9ac1de-52f4-4d7a-9c18-7e0b5f2a4d63Name (uz)
YunusobodName (ru)
ЮнусабадName (en)
YunusabadName (uz-cyrl)
ЮнусободName (tr)
YunusabadName (tj)
ЮнусободName (ky)
ЮнусабадStreet
Amir Temur ko'chasi 12client object
The client the lead was attached to or detached from — present for
ATTACH_LEAD_TO_CLIENT and REMOVE_CLIENT_FROM_LEAD.
ID of the referenced object
5821Its name at the time of the event
Alisher YusupovrelatedLead object
The other lead involved — present for LEAD_MERGE, COPY_LEAD and
COPY_LEAD_FROM.
ID of the referenced object
5821Its name at the time of the event
Alisher Yusupovcontract object
The contract the lead was attached to or detached from, resolved from the
contract ID in objectId — present for ATTACH_LEAD_TO_CONTRACT and
REMOVE_LEAD_FROM_CONTRACT. The raw value holds only the contract number;
this adds its status, amount and currency.
Contract ID
5001Contract number
CNT-2023-001Contract status enum.
Possible values: [STARTED, ACTIVE, CANCELLED, FINISHED, TRANSFERRED]
ACTIVEOriginal contract price (without discount)
50000Discount amount
5000ISO code of the contract currency
UZSUZSflat object
The flat that was attached, resolved from the flat ID in objectId — present
for ATTACH_FLAT. The raw current holds only the flat number, which does
not say which building or project it belongs to.
Apartment ID
7781Apartment number
45Room count
3Floor
5Area, m².
78.4Whether the apartment is repaired
trueBuilding ID
34Building name
A blokHouse (project) ID
12House (project) name
Green ValleycallNote object
The note the call rating belongs to (objectId is a lead_note ID) —
present for CALL_EVALUATED and CALL_EVALUATE_DELETED. Omitted when the
note has been deleted.
Note ID (null when creating)
7001Whether the note is pinned.
falsefalseNote text. Required, length 1–500.
Possible values: non-empty and <= 500 characters
Client requested a callbackLead note type enum.
SIMPLE— ordinary noteSMS— a sent SMSPHONE— a phone call note
Possible values: [SIMPLE, SMS, PHONE]
SIMPLESIMPLEID of the lead the note belongs to. Response only — ignored if sent in a request. The only way to attribute a note to a lead when it comes back from a company-wide POST /v1/open-api/lead-event/filter or POST /v1/open-api/lead-note/filter (no leadIds in the request).
26801createdBy objectnullable
Employee who wrote the note. Response only — ignored if sent in a request. Filter with createdByIds.
Employee ID
201Employee full name
David WilsonTime the note was written, epoch seconds. Response only.
1730000000deletedBy objectnullable
Employee who deleted the note — pairs with deletedTimestamp. null when not deleted.
Employee ID
201Employee full name
David WilsonDeletion time (epoch seconds); null when not deleted.
nulltrue when the note is soft-deleted.
falsefiles object[]nullable
Files attached to the note. null when the caller path does not load files
(GET /v1/open-api/lead-event/filter's note rows); an empty array means no files
attached. Populated on GET .../list and POST /v1/open-api/lead-note/filter.
Presigned URL to the full-size file
https://minio.uysot.uz/uysot/files/201/avatar.png?X-Amz-Expires=3600Presigned URL to the thumbnail rendition
https://minio.uysot.uz/uysot/files/201/avatar_thumb.png?X-Amz-Expires=3600Presigned URL to the smallest rendition
https://minio.uysot.uz/uysot/files/201/avatar_small.png?X-Amz-Expires=3600Deprecated — use createdBy.id.
95previousPipeStatus object
The previous pipeline stage, resolved from the pipeStatusId in
previous — present only for CHANGE_STATUS (CREATE_STATUS puts the lead
on its first stage, so there is no previous one). A stage that was since
deleted is still resolved, with its deletedTimestamp filled in.
Pipeline stage ID
1Pipeline stage name
New LeadPipeline stage order
1Pipeline stage color
#FF0000Pipeline stage type enum.
Possible values: [FIRST, SIMPLE, SUCCESS, FAILED]
FIRSTPipeline ID
1Pipeline name
Sales PipelineDeletion time (epoch seconds, null if active)
nullcurrentPipeStatus object
The new pipeline stage, resolved from the pipeStatusId in current —
present for CHANGE_STATUS and CREATE_STATUS.
Pipeline stage ID
1Pipeline stage name
New LeadPipeline stage order
1Pipeline stage color
#FF0000Pipeline stage type enum.
Possible values: [FIRST, SIMPLE, SUCCESS, FAILED]
FIRSTPipeline ID
1Pipeline name
Sales PipelineDeletion time (epoch seconds, null if active)
nullpreviousTag object
The tag that was removed, resolved from the name in previous — present
only for REMOVE_TAG. Omitted entirely (not null) when the tag no longer
exists under that name, while previous still carries the raw name.
Tag ID
41Tag name
VIPDisplay colour (hex).
#FF5733currentTag object
The tag that was added, resolved from the name in current — present only
for CREATE_TAG; omitted when it cannot be resolved, same as previousTag.
Tag ID
41Tag name
VIPDisplay colour (hex).
#FF5733previousReason object
The previous refusal reason, resolved from the text in previous —
present only for CHANGE_REASONS_FOR_REFUSAL. Omitted when the reason is no
longer in the company's reference list under that text.
Refusal reason ID. 0 is the synthetic "no reason given" entry.
14Reason text
Narx qimmatDisplay order
1currentReason object
The new refusal reason, resolved from the text in current — present for
CREATE_REASONS_FOR_REFUSAL and CHANGE_REASONS_FOR_REFUSAL; omitted when it
cannot be resolved, same as previousReason.
Refusal reason ID. 0 is the synthetic "no reason given" entry.
14Reason text
Narx qimmatDisplay order
1previousEmployee object
The previous responsible employee, resolved from the ID in previous.
Present only for CHANGE_LEAD_EMPLOYEE — SET_LEAD_EMPLOYEE assigns the
first responsible employee, so there is no previous one. Omitted entirely
(not null) when the employee cannot be resolved — deleted, or belonging to
another company — while previous still carries the raw ID.
Employee ID
201Employee full name
David WilsoncurrentEmployee object
The new responsible employee, resolved from the ID in current. Present
for CHANGE_LEAD_EMPLOYEE and SET_LEAD_EMPLOYEE; omitted when it cannot be
resolved, same as previousEmployee.
Employee ID
201Employee full name
David Wilson{
"eventId": 918233,
"leadId": 26801,
"leadName": "Yunusobod 3/45 — Alisher",
"actionType": "CHANGE_STATUS",
"objectLog": "LEAD",
"createdTimestamp": 1735689600,
"createdEmployee": {
"id": 201,
"fullName": "David Wilson"
},
"contactId": 5124,
"contactName": "Dilnoza Rustamova",
"previous": "3",
"current": "5",
"objectId": "172",
"crmField": {
"id": 172,
"name": "Byudjet",
"type": "SELECT"
},
"previousAddress": {
"country": {
"id": 1,
"zone": "Asia/Tashkent",
"uz": "O'zbekiston",
"ru": "Узбекистан",
"en": "Uzbekistan",
"kr": "Ўзбекистон",
"tr": "Özbekistan",
"tj": "Ӯзбекистон",
"ky": "Өзбекстан"
},
"city": {
"id": 14,
"uuid": "0f4c1a2e-8b7d-4a11-9f3c-2d5e6a7b8c90",
"uz": "Toshkent",
"ru": "Ташкент",
"en": "Tashkent",
"kr": "Тошкент",
"tr": "Taşkent",
"tj": "Тошканд",
"ky": "Ташкент"
},
"district": {
"id": 207,
"uuid": "3b9ac1de-52f4-4d7a-9c18-7e0b5f2a4d63",
"uz": "Yunusobod",
"ru": "Юнусабад",
"en": "Yunusabad",
"kr": "Юнусобод",
"tr": "Yunusabad",
"tj": "Юнусобод",
"ky": "Юнусабад"
},
"street": "Amir Temur ko'chasi 12"
},
"currentAddress": {
"country": {
"id": 1,
"zone": "Asia/Tashkent",
"uz": "O'zbekiston",
"ru": "Узбекистан",
"en": "Uzbekistan",
"kr": "Ўзбекистон",
"tr": "Özbekistan",
"tj": "Ӯзбекистон",
"ky": "Өзбекстан"
},
"city": {
"id": 14,
"uuid": "0f4c1a2e-8b7d-4a11-9f3c-2d5e6a7b8c90",
"uz": "Toshkent",
"ru": "Ташкент",
"en": "Tashkent",
"kr": "Тошкент",
"tr": "Taşkent",
"tj": "Тошканд",
"ky": "Ташкент"
},
"district": {
"id": 207,
"uuid": "3b9ac1de-52f4-4d7a-9c18-7e0b5f2a4d63",
"uz": "Yunusobod",
"ru": "Юнусабад",
"en": "Yunusabad",
"kr": "Юнусобод",
"tr": "Yunusabad",
"tj": "Юнусобод",
"ky": "Юнусабад"
},
"street": "Amir Temur ko'chasi 12"
},
"client": {
"id": 5821,
"name": "Alisher Yusupov"
},
"relatedLead": {
"id": 5821,
"name": "Alisher Yusupov"
},
"contract": {
"id": 5001,
"contractNumber": "CNT-2023-001",
"status": "ACTIVE",
"amount": 50000,
"discount": 5000,
"ccy": "UZS"
},
"flat": {
"id": 7781,
"number": "45",
"rooms": "3",
"floor": 5,
"area": 78.4,
"repaired": true,
"buildingId": 34,
"buildingName": "A blok",
"houseId": 12,
"houseName": "Green Valley"
},
"callNote": {
"id": 7001,
"isPin": false,
"text": "Client requested a callback",
"type": "SIMPLE",
"leadId": 26801,
"createdBy": {
"id": 201,
"fullName": "David Wilson"
},
"createdTimestamp": 1730000000,
"deletedBy": {
"id": 201,
"fullName": "David Wilson"
},
"deletedTimestamp": null,
"deleted": false,
"files": [
{
"absolutePath": "https://minio.uysot.uz/uysot/files/201/avatar.png?X-Amz-Expires=3600",
"thumbAbsolutePath": "https://minio.uysot.uz/uysot/files/201/avatar_thumb.png?X-Amz-Expires=3600",
"smallestAbsolutePath": "https://minio.uysot.uz/uysot/files/201/avatar_small.png?X-Amz-Expires=3600"
}
]
},
"previousPipeStatus": {
"id": 1,
"name": "New Lead",
"orders": 1,
"color": "#FF0000",
"type": "FIRST",
"pipeId": 1,
"pipeName": "Sales Pipeline",
"deletedTimestamp": null
},
"currentPipeStatus": {
"id": 1,
"name": "New Lead",
"orders": 1,
"color": "#FF0000",
"type": "FIRST",
"pipeId": 1,
"pipeName": "Sales Pipeline",
"deletedTimestamp": null
},
"previousTag": {
"id": 41,
"name": "VIP",
"color": "#FF5733"
},
"currentTag": {
"id": 41,
"name": "VIP",
"color": "#FF5733"
},
"previousReason": {
"id": 14,
"value": "Narx qimmat",
"orders": 1
},
"currentReason": {
"id": 14,
"value": "Narx qimmat",
"orders": 1
},
"previousEmployee": {
"id": 201,
"fullName": "David Wilson"
},
"currentEmployee": {
"id": 201,
"fullName": "David Wilson"
}
}