Webhooks belong to the Carrier & MGA API. This event fires about an agency you appoint, and only a credential on that surface
(carrier, MGA or wholesaler) can subscribe to it.
Overview
TheDOWNSTREAM_ENTITY_UPDATED webhook is triggered when an agency’s identity or profile changes after it was created.
It exists because agency names change on their own. A name filed with NIPR propagates into Turris on the daily sync, and an agency invited under a working name is renamed to its legal name the moment it submits its NPN. Neither is something you can anticipate, and neither previously produced any signal. If your reporting keys on agency name, the copy in your system drifts and the same agency starts appearing twice.
This event tells you the record changed, which fields changed, and what they were before.
Webhook type: DOWNSTREAM_ENTITY_UPDATED
Triggers
This webhook fires when a published field on the agency relationship changes:- the daily NIPR sync propagates a filed name change
- an agency you invited submits its NPN and is renamed to its legal name
- you edit the agency from the Entity Details tab
- you change the agency’s NPN, or its EIN is corrected
- an agency record updates through the HubSpot sync
This webhook is sent immediately, with no debouncing. Three consequences worth designing for, all covered
below: a single edit can produce more than one delivery, a change to the agency record produces one delivery per
relationship you hold with that agency, and a bulk operation can produce a burst.
What fires this event
Each field is published from exactly one record. That matters because an agency has two: the relationship you hold with it, which carries the details you see and edit, and the agency record itself, which carries its legal identity. From the relationship —branchName, doingBusinessAs, producerCode, externalId, website, phoneNumber, faxNumber, legalAddress, mailingAddress, entityType
From the agency record — legalName, npn, ein
What does not fire it
Payload Example
A legal name change, the case this event was built for:Keeping your copy in sync
Match ondownstreamEntityAssociationId. It is the same identifier carried by Agency Created and Producer Agreement Executed, so the record you created from one of those events is the record to update from this one.
Do not match on name. That is the failure this event exists to prevent.
The payload carries the full current record for this relationship, not just the delta, so a straight overwrite is enough for most integrations. Read changedFields when you only care about some fields:
The three identity fields travel as a group
legalName, npn and ein all come from one read of the agency record, so they
share one rule: either all three are present — each a string or null — or
all three are absent.
So absent means unknown, and
null means empty. If you overwrite wholesale,
skip the identity fields when they are absent rather than writing null over
what you already hold — otherwise a transient failure on our side clears a good
EIN on yours. Every other field on the payload is always present.
One edit can produce more than one delivery
Some fields live on the relationship and some on the agency record, so an edit touching both produces a delivery for each write, with differentchangedFields.
Every one is correct and every one carries the full current record.
For an agency you hold one relationship with, that is two deliveries. For an
agency you hold several relationships with it is one plus one per relationship,
because the agency-record half fans out (see below).
Apply each delivery idempotently. Do not simply let the last one you receive
win — see below.
Arrival order is not change order
A delivery that fails is retried with exponential backoff, so it can arrive after a delivery describing a newer state. Nothing on the wire lets you order two deliveries: the payload carries no sequence number, andX-Turris-Timestamp
is regenerated on every attempt, so it is the time we sent that attempt and not
the time the change happened.
For most fields this does not matter — the next change re-delivers the current
value. Where it does matter, use previousValues as a precondition instead of
applying blindly:
A change to the agency record reaches every relationship
If you hold more than one relationship with the same agency, for example under different producer codes, a change tolegalName, npn, or ein delivers once per relationship. Each delivery carries its own downstreamEntityAssociationId and its own hierarchy fields, and they share a downstreamEntityId.
Archived relationships are excluded.
Field Reference
Payload Fields
previousValues is best effort. When the prior state cannot be recovered it is null and the event is still delivered, because a change announced without its old value is more useful than no event at all. Do not make it a required input: read the current values, and treat previousValues as a convenience for reconciling a record you keyed on the old name.When it is present it contains exactly the fields named in changedFields, and nothing else. Read it as the state before this change:- a field absent from
previousValueswas not part of this change - a field present with a string held that value before the change
- a field present with
nullhad no value before the change, so this change populated it
previousValues and null at the top level of the payload — not the other way round.path is a snapshot as of this event. Moving an agency to a different parent rewrites it, and that change is not currently signalled by a webhook. If you cache the hierarchy, re-read it from List Associations rather than assuming it is stable.