ProducerSync API: Webhook Events
The ProducerSync API publishes webhook events to notify your system when producer compliance data is ready or when your monitored population changes. Use these events to drive efficient daily synchronization without polling.
For instructions on how to register an endpoint, verify delivery, and validate signatures, see the Webhooks Quick Start Guide.
Available Events
| Event Type | When It Fires | Common Use Cases |
|---|---|---|
producersync.updates_available | After NIPR completes daily updates and AgentSync processes them | Trigger API calls to pull the latest producer compliance data |
producersync.npn.activated | A producer is added to your monitored population | Start onboarding workflows, run initial compliance checks |
producersync.npn.deactivated | A producer is removed from your monitored population | Remove from active monitoring, trigger offboarding actions |
Subscribe to the high-level producersync group to receive all three, or subscribe to individual event types.
💡
activatedanddeactivatedevents fire immediately — they're triggered by changes to your account's subscription list, not by NIPR's daily cycle.updates_availableis tied to the daily NIPR update process.
Event Schema
{
"id": "evt_12345",
"type": "producersync.updates_available",
"timestamp": "2025-07-24T22:51:05.206Z",
"data": {}
}
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for this event. Repeated on retries — use for deduplication. |
type | string | The specific event type |
timestamp | string (ISO 8601) | UTC time the event was generated |
data | object | Event-specific payload (see examples below) |
Example Payloads
producersync.updates_available
Fires once per day after AgentSync processes the NIPR data refresh. Use data.runDate as the value for the updatedSince parameter in your subsequent API calls.
{
"id": "whe_000012345",
"type": "producersync.updates_available",
"timestamp": "2025-07-24T22:51:05.206Z",
"data": {
"runDate": "2025-07-24"
}
}
Recommended response:
import requests
def handle_updates_available(event, access_token):
run_date = event["data"]["runDate"]
# Use run_date as updatedSince to fetch only changed records
response = requests.get(
f"https://api.agentsync.io/v2/licenses?updatedSince={run_date}",
headers={"Authorization": f"Bearer {access_token}"}
)
licenses = response.json().get("embedded", {}).get("licenses", [])
# ... process and persist
producersync.npn.activated
{
"id": "whe_123454321",
"type": "producersync.npn.activated",
"timestamp": "2025-07-25T15:53:01.579Z",
"data": {
"npn": "15645555",
"activatedAt": "2025-07-25T15:53:01.579Z"
}
}
producersync.npn.deactivated
{
"id": "whe_123454322",
"type": "producersync.npn.deactivated",
"timestamp": "2025-07-25T15:53:01.579Z",
"data": {
"npn": "15645555",
"deactivatedAt": "2025-07-25T15:53:01.579Z"
}
}
Recommended Daily Sync Workflow
- Receive
producersync.updates_available— this is your trigger to start processing - Extract
data.runDatefrom the event payload - Call API endpoints with
updatedSince=<runDate>— this ensures you only fetch records that changed - Process and persist the updated records in your system
This pattern replaces scheduled polling jobs and ensures you process data as soon as it's available.
See the ProducerSync API Quick Start Guide for the full sync workflow with code examples.
Processing Recommendations
- Use
idfor deduplication — if an event is retried, theidstays the same - Respond within 5 seconds — offload heavy processing to a queue or background job
- Validate signatures — verify the
webhook-signatureheader before processing - Log all receipts — log the full event payload and
idfor troubleshooting and replay
See Webhooks Quick Start Guide for signature validation details.