Skip to content

Segment events

Webhook events for segments you subscribe to. 3 events.

Every event is sent as an HTTP POST with JSON. See Webhooks for setup, signing and delivery.

Event Description
segment/companies-updated Sent when companies enter or leave a segment you subscribe to.
segment/properties-updated Sent when properties enter or leave a segment you subscribe to.
segment/persons-updated Sent when persons enter or leave a segment you subscribe to.

segment/companies-updated

Sent when companies enter or leave a segment you subscribe to.

event: segment.updated

{
"event": "segment.updated",
"event_id": "req_63246e166IstnPKY",
"data": {
"name": "Mit segment",
"type": "companies",
"filters": {
"cities": [
"Copenhagen"
],
"active": "1"
},
"added": [
{
"id": "36732261",
"slug": "company",
"url": "/api/v2/company/36732261"
}
],
"deleted": [
{
"id": "36732261",
"slug": "company",
"url": "/api/v2/company/36732261"
}
]
}
}

Fields in the body

Field Type Description
event string e.g. segment.updated
event_id string The same on every attempt of this event. e.g. req_63246e166IstnPKY
data object
data.name string e.g. Mit segment
data.type string e.g. companies
data.filters object
data.added array<object>
data.added[].id any CVR for companies, DAF ID for properties, item_id for persons. e.g. 36732261
data.added[].slug string company, property, person
data.added[].url string e.g. /api/v2/company/36732261
data.deleted array<object>
data.deleted[].id any CVR for companies, DAF ID for properties, item_id for persons. e.g. 36732261
data.deleted[].slug string company, property, person
data.deleted[].url string e.g. /api/v2/company/36732261

segment/properties-updated

Sent when properties enter or leave a segment you subscribe to.

event: segment.updated

{
"event": "segment.updated",
"event_id": "req_63246e166IstnPKY",
"data": {
"name": "Mit segment",
"type": "properties",
"filters": {
"zip": "9000",
"ownership_states": [
"80"
]
},
"added": [
{
"id": "36732261",
"slug": "company",
"url": "/api/v2/company/36732261"
}
],
"deleted": [
{
"id": "36732261",
"slug": "company",
"url": "/api/v2/company/36732261"
}
]
}
}

Fields in the body

Field Type Description
event string e.g. segment.updated
event_id string The same on every attempt of this event. e.g. req_63246e166IstnPKY
data object
data.name string e.g. Mit segment
data.type string e.g. properties
data.filters object
data.added array<object>
data.added[].id any CVR for companies, DAF ID for properties, item_id for persons. e.g. 36732261
data.added[].slug string company, property, person
data.added[].url string e.g. /api/v2/company/36732261
data.deleted array<object>
data.deleted[].id any CVR for companies, DAF ID for properties, item_id for persons. e.g. 36732261
data.deleted[].slug string company, property, person
data.deleted[].url string e.g. /api/v2/company/36732261

segment/persons-updated

Sent when persons enter or leave a segment you subscribe to.

event: segment.updated

{
"event": "segment.updated",
"event_id": "req_63246e166IstnPKY",
"data": {
"name": "Mit segment",
"type": "persons",
"filters": {
"districts": [
"851"
],
"properties_count_from": "1"
},
"added": [
{
"id": "36732261",
"slug": "company",
"url": "/api/v2/company/36732261"
}
],
"deleted": [
{
"id": "36732261",
"slug": "company",
"url": "/api/v2/company/36732261"
}
]
}
}

Fields in the body

Field Type Description
event string e.g. segment.updated
event_id string The same on every attempt of this event. e.g. req_63246e166IstnPKY
data object
data.name string e.g. Mit segment
data.type string e.g. persons
data.filters object
data.added array<object>
data.added[].id any CVR for companies, DAF ID for properties, item_id for persons. e.g. 36732261
data.added[].slug string company, property, person
data.added[].url string e.g. /api/v2/company/36732261
data.deleted array<object>
data.deleted[].id any CVR for companies, DAF ID for properties, item_id for persons. e.g. 36732261
data.deleted[].slug string company, property, person
data.deleted[].url string e.g. /api/v2/company/36732261