Retrieving Events
Why You Would Use This
Section titled “Why You Would Use This”Retrieving events is the core workflow for pull endpoints. Instead of receiving webhooks pushed to your server, you pull events from HookBridge on your own schedule. This gives you full control over when and how events are processed.
The typical pattern is: list events to see what is available, get individual events to fetch their full payloads, and acknowledge events after successful processing.
How It Works
Section titled “How It Works”Events progress through three statuses:
stored- The event has been received and is waiting to be retrieved.fetched- The event payload has been retrieved via the get event endpoint. HookBridge marks this automatically when you fetch an event’s payload.delivered- The event has been explicitly acknowledged via the ack endpoint.
Fetching an event marks it as fetched but does not mark it as delivered. You must call the acknowledge endpoint after processing. If your client crashes between fetching and processing, the event stays in fetched status and you can retrieve it again.
Acknowledged events are not removed. They remain available and can be re-retrieved if needed.
Console Workflow
Section titled “Console Workflow”- Open Endpoints and switch to Pull.
- Open a pull endpoint to view its events.
- Use filters to narrow by event type, status, or date range.
- Click an event to view its full payload and original headers.
API Workflow
Section titled “API Workflow”API reference:
1) List events
Section titled “1) List events”List events returns metadata only (no payloads) for fast pagination across large event sets.
# List unacknowledged events (default: status=stored)curl "https://api.hookbridge.io/v1/pull-endpoints/YOUR_PULL_ENDPOINT_ID/events" \ -H "Authorization: Bearer YOUR_API_KEY"
# Filter by event typecurl "https://api.hookbridge.io/v1/pull-endpoints/YOUR_PULL_ENDPOINT_ID/events?event_type=payment_intent.succeeded" \ -H "Authorization: Bearer YOUR_API_KEY"
# Filter by time rangecurl "https://api.hookbridge.io/v1/pull-endpoints/YOUR_PULL_ENDPOINT_ID/events?since=2026-03-01T00:00:00Z&before=2026-03-02T00:00:00Z" \ -H "Authorization: Bearer YOUR_API_KEY"
# List all events regardless of statuscurl "https://api.hookbridge.io/v1/pull-endpoints/YOUR_PULL_ENDPOINT_ID/events?status=all&limit=500" \ -H "Authorization: Bearer YOUR_API_KEY"
# Paginate with cursorcurl "https://api.hookbridge.io/v1/pull-endpoints/YOUR_PULL_ENDPOINT_ID/events?cursor=NEXT_CURSOR_VALUE" \ -H "Authorization: Bearer YOUR_API_KEY"Query parameters:
| Param | Type | Default | Description |
|---|---|---|---|
status | string | stored | stored, fetched, delivered, or all |
event_type | string | — | Exact match filter (e.g., payment_intent.succeeded) |
since | ISO 8601 | — | Events received after this timestamp (inclusive) |
before | ISO 8601 | — | Events received before this timestamp (exclusive) |
limit | integer | 100 | Page size (1–1000) |
cursor | string | — | Opaque cursor from a previous response |
Events are returned in chronological order (oldest first).
2) Get a single event with payload
Section titled “2) Get a single event with payload”curl "https://api.hookbridge.io/v1/pull-endpoints/YOUR_PULL_ENDPOINT_ID/events/EVENT_ID" \ -H "Authorization: Bearer YOUR_API_KEY"The response includes the full payload and original HTTP headers from the webhook provider. JSON payloads are embedded directly; non-JSON payloads are base64-encoded.
Returns 410 Gone if the event payload has been cleaned up by the retention process.
3) Acknowledge events
Section titled “3) Acknowledge events”After processing events successfully, acknowledge them to mark them as delivered:
curl -X POST "https://api.hookbridge.io/v1/pull-endpoints/YOUR_PULL_ENDPOINT_ID/events/ack" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "event_ids": ["EVENT_ID_1", "EVENT_ID_2", "EVENT_ID_3"] }'- Accepts up to 1000 event IDs per request.
- Idempotent: acknowledging already-delivered events is a no-op for those events.
- All event IDs must belong to the specified pull endpoint.
- The response includes the count of newly acknowledged events.
Example: Batch Processing Workflow
Section titled “Example: Batch Processing Workflow”A common pattern for batch consumers:
# 1. List unacknowledged eventsEVENTS=$(curl -s "https://api.hookbridge.io/v1/pull-endpoints/YOUR_PULL_ENDPOINT_ID/events?limit=100" \ -H "Authorization: Bearer YOUR_API_KEY")
# 2. For each event, fetch the full payload and process itEVENT_ID="msg_01JQXYZ..."curl -s "https://api.hookbridge.io/v1/pull-endpoints/YOUR_PULL_ENDPOINT_ID/events/$EVENT_ID" \ -H "Authorization: Bearer YOUR_API_KEY"
# 3. After processing a batch, acknowledge all at oncecurl -X POST "https://api.hookbridge.io/v1/pull-endpoints/YOUR_PULL_ENDPOINT_ID/events/ack" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"event_ids": ["msg_01JQX...", "msg_01JQY...", "msg_01JQZ..."]}'Operational Tips
Section titled “Operational Tips”- Use
status=stored(the default) when polling for new work. This returns only events that have not been fetched or acknowledged. - Use
status=fetchedto find events that have been retrieved but not yet acknowledged. This is useful for detecting stalled consumers or events that need to be reprocessed. - Acknowledge events in batches after processing rather than one at a time for better efficiency.
- If you need to reprocess events, use
status=deliveredorstatus=allto retrieve previously acknowledged events. - Use
event_typefiltering to build consumers that only process specific event types from the same endpoint. - Use
sinceto avoid re-scanning old events on each poll cycle. Track thereceived_atof the last event you processed and pass it assinceon the next request.
Enter your credentials to populate code examples throughout the docs.