Events

How to read the history of webhook events that were sent, check delivery status, and recover from missed deliveries.

🚧

Early Adopter Opportunity

The Webhooks API is in early adoption and available only to approved early adoption (EA) partners and customers. Do not rely on this version for production workloads unless explicitly authorized. If you have any feedback, please share with your designated Early Adoption program representative.

Webhook Events

The Events API gives you visibility into webhook activity for your subscriptions.

Each event Paylocity attempts to deliver is recorded, whether or not the delivery was successful. You can use the Events API to:

  • Review webhook activity
  • Check the delivery status of an event
  • Troubleshoot failed deliveries
  • Review individual delivery attempts
  • Identify events that may need to be reconciled after an endpoint outage or other delivery issue

For details about the events available through Paylocity Webhooks, see Webhooks Event Types.

List Events

GET /apiHub/webhooks/v1/events

Use this endpoint to retrieve webhook events and narrow the results using filters, sorting, and pagination.

Query ParameterDescription
filterFilters the events returned. Supported fields include: subscriptionId (in), type (in), status (in), time (ge, le), applicationId (eq), clientId (eq)
limitNumber of events returned per page. The default and maximum value is 25.
includeIncludes related resources in the response. Use logs to include details about individual delivery attempts.
offsetSpecifies the starting position when retrieving additional results.
sortControls the order in which events are returned.
includeTotalCountControls whether the total number of matching events is included in the response.

Example: Find failed events

The following example retrieves failed events for a specific subscription beginning at a specified time:

curl -X GET "https://dc1demogwext.paylocity.com/apiHub/webhooks/v1/events?filter=status in ('Failed') and subscriptionId in ('YOUR_SUBSCRIPTION_ID') and time ge '2024-01-15T00:00:00Z'&limit=25&sort=-time" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Accept: application/json"

Understanding an Event

Each event includes information about what occurred and what happened when Paylocity attempted to deliver it.

FieldDescription
idUnique identifier for the webhook event
correlationIdIdentifier that can be used to trace the event across systems.
subscriptionIdID of the subscription associated with the event.
subscriptionNameName of the subscription associated with the event.
typeEvent type, such as employee.person.v1.
mutationType of change that occurred: created, updated, or deleted.
timeTime the underlying change occurred.
dataEvent payload. The information included varies by event type.
statusCurrent delivery status: Delivered, Failed, or Pending.
lastStatusCodeHTTP status code from the most recent delivery attempt.
totalAttemptsTotal number of delivery attempts made for the event.
logsDetails for individual delivery attempts when include=logs is requested. Each log includes responseCode, attemptNumber, durationMs, and createdAt.

Viewing Delivery Attempts

To troubleshoot an event in more detail, include logs in your request:
include=logs

The returned logs provide information about each delivery attempt, including:

  • Response code
  • Attempt number
  • Duration
  • Time of the attempt

This can help you understand what occurred across multiple delivery attempts instead of looking only at the event's current status.

Delivery Status

Paylocity considers a webhook delivered when your endpoint returns an HTTP response, including a 4xx or 5xx response.

A delivery is considered undeliverable when Paylocity cannot receive a response from your endpoint, such as when a timeout or connection error occurs. Undeliverable events may be eligible for retry.

Important: An HTTP response indicates that the webhook reached your endpoint. A 4xx or 5xx response is therefore still considered delivered for webhook delivery-status purposes.

Recovering Missed Events

If your endpoint experiences downtime or another delivery issue, you can use the Events API to identify events that may require reconciliation.

For example, use the time filter to search the affected time period and filter for events with a Failed status:

status in ('Failed')

After identifying the affected events, use the event's data and the applicable Paylocity read API to reconcile the current state of the affected resource.