---
title: "ProducerSync API: Webhook Events"
description: "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."
url: "https://developer.agentsync.io/producersync-api-webhooks"
image: "https://developer.agentsync.io/_og/d/c_Ocean.takumi,title_~UHJvZHVjZXJTeW5jIEFQSTogV2ViaG9vayBFdmVudHM,description_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.,props_eyJ0aGVtZSI6eyJtb2RlIjoibGlnaHQiLCJjb2xvcnMiOnsicHJpbWFyeSI6IiMxODdFRkYifX19,p_Ii9wcm9kdWNlcnN5bmMtYXBpLXdlYmhvb2tzIg,s_MAwwlMYb6o8asQil.png"
---

# 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](https://developer.agentsync.io/webhooks-quick-start-guide).

## [Available Events](#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.

> `activated` and `deactivated` events fire immediately — they're triggered by changes to your account's subscription list, not by NIPR's daily cycle. `updates_available` is tied to the daily NIPR update process.

## [Event Schema](#event-schema)

```json
{
  "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](#example-payloads)

### [`producersync.updates_available`](#producersyncupdates_available)

Fires **once per day**, after AgentSync has finished processing NIPR's refresh across your entire monitored population.

This is a batch-complete signal, not a per-producer one. There is no event for an individual NPN, and the payload carries only a `runDate` — no NPN — because the event means "every producer you monitor has been processed," not "this producer changed." NIPR publishes once daily, so this is the cadence at which compliance data can change at all.

Use `data.runDate` as the value for the `updatedSince` parameter to fetch just the records that changed.

```json
{
  "id": "whe_000012345",
  "type": "producersync.updates_available",
  "timestamp": "2025-07-24T22:51:05.206Z",
  "data": {
    "runDate": "2025-07-24"
  }
}
```

**Recommended response:**

```python
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`](#producersyncnpnactivated)

```json
{
  "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`](#producersyncnpndeactivated)

```json
{
  "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](#recommended-daily-sync-workflow)

1.  **Receive `producersync.updates_available`** — this is your trigger to start processing
2.  **Extract `data.runDate`** from the event payload
3.  **Call API endpoints with `updatedSince=<runDate>`** — this ensures you only fetch records that changed
4.  **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](https://developer.agentsync.io/producersync-api-quick-start-guide) for the full sync workflow with code examples.

## [Processing Recommendations](#processing-recommendations)

-   **Use `id` for deduplication** — if an event is retried, the `id` stays the same
-   **Respond within 5 seconds** — offload heavy processing to a queue or background job
-   **Validate signatures** — verify the `webhook-signature` header before processing
-   **Log all receipts** — log the full event payload and `id` for troubleshooting and replay

See [Webhooks Quick Start Guide](https://developer.agentsync.io/webhooks-quick-start-guide) for signature validation details.