Event Subscriptions
Event subscriptions let Plextera push product events to your webhook endpoint. Use them when your integration should react to completed, failed, or rejected processing without polling.
When to use events
A common production pattern is: subscribe to terminal events, process webhook deliveries immediately, and periodically poll resources that have not completed after an expected time window.
Available events
Closing a run in Plextera Studio is treated as a failure outcome for event delivery: subscribers of workflow.run.failed receive an event whose run status is CLOSED. Check the status field in the payload if your handler needs to distinguish the two.
Setup
Create an event subscription
Call POST /event-subscriptions with:
name- an optional display name for the subscription (maximum 128 characters).endpointUrl- the HTTPS URL Plextera should POST events to (maximum 2,048 characters; credentials and fragments are not allowed).eventTypes- one or more event types to subscribe to (maximum 16).filters- optional filters for workflow events, for example a specific workflow ID (maximum 256 characters).
Plextera generates the signing secret.
The 201 Created response returns it once together with the new active subscription.
Store the value securely while handling the response and configure it in your webhook receiver.
Each workspace can have up to 50 event subscriptions.
Delete an unused subscription before creating another one after reaching this limit.
Create subscription returns 409 CONFLICT when the quota is already exhausted.
Document Insights subscriptions rarely need filters - the event types already select what is delivered. The response omits filters when none are configured.
Implement your webhook endpoint
Your endpoint must:
- Accept
POSTrequests with a JSON body. - Read the raw request body for signature verification.
- Return a
2xxstatus within 15 seconds - acknowledge first, then process the event asynchronously. Slow responses time out and count as failed deliveries. - Handle duplicate deliveries safely.
Event payload model
Every event uses a common envelope:
The data field contains the event-specific payload. See the Event Reference for complete schemas and examples.
Delivery headers
Every webhook delivery includes:
Verifying signatures
Each delivery is signed using the server-generated signingSecret returned when the subscription is created.
This confirms the delivery came from Plextera and that the payload was not modified.
Signature format:
Verification steps:
- Extract
tandv1from the header. - Construct the signed payload:
<t>.<raw request body>. - Compute HMAC-SHA256 using your
signingSecret. - Compare the computed signature with
v1using a constant-time comparison. - Optionally reject old timestamps for replay protection.
Public list, get, and update responses never contain the signing secret, and the Public API has no reveal endpoint. Store the value from the successful create response securely. Authorized dashboard users can explicitly reveal the current secret if needed.
Retry and idempotency
- The same
eventIdmay be delivered more than once. - Your webhook handler should be idempotent. Store processed
eventIdvalues or use your own deduplication key. - If a document is reprocessed after a terminal state, a later terminal state can produce a new event.
Automatic retry schedule
The first attempt is immediate. A non-2xx response, connection error, or timeout then follows this schedule:
The maximum of six attempts includes the initial attempt.
After the sixth failed attempt, the delivery becomes failed.
The actual timestamps can be slightly later under load or during infrastructure recovery.
Events and deliveries
Plextera keeps four related records:
- An event is one immutable product occurrence and contains the exact webhook payload.
- A subscription defines which events should be sent and to which endpoint.
- A delivery represents one event sent to one subscription.
- An attempt is one HTTP request made for a delivery.
An event is recorded even when no active subscription matches it. One event can have several deliveries when several subscriptions match or when someone manually resends it.
Inspect events
Use GET /events to see events for the workspace, whether or not they were delivered.
Results are newest first by default.
Filter by eventType, subscriptionId, and the inclusive event-record createdAt range with from and to, or use sort=asc to read oldest first.
When subscriptionId is present, the list contains only events with a delivery to that subscription and each event’s deliverySummary is scoped to that subscription.
Manual resends do not duplicate the event in this list.
Each item includes deliverySummary with counts for pending, retrying, delivered, and failed.
Use GET /events/{eventId} to load the exact event payload.
For Document Insights events, document.contentUrl is minted when the event is created and remains valid for up to five days.
Retries and manual resends use the same payload and URL.
If the URL has expired, call GET /document-insights/extractions/{extractionId} to obtain a fresh one.
To open event history for one subscription:
Inspect deliveries for an event
Use GET /events/{eventId}/deliveries to see every delivery of one event across subscriptions and manual resends.
Results are newest first by default.
Filter by status (pending, retrying, delivered, failed), subscriptionId, and the inclusive createdAt range with from and to.
Each delivery identifies its subscriptionId and endpointUrl.
It also shows its status, attemptCount, the last HTTP responseStatusCode, the last error, and nextAttemptAt for scheduled retries.
For a manual resend, resendOfDeliveryId identifies the delivery selected by the user.
This is the fastest way to debug a misbehaving webhook endpoint: if deliveries are retrying or failed, the response code and error tell you why.
To inspect history for one subscription, use GET /events?subscriptionId={subscriptionId} and open an event’s deliveries.
Inspect one delivery
Use the delivery id from the list to inspect the event payload and recent HTTP attempt history:
The response returns up to the 100 most recent attempt records, ordered oldest first within that returned window. totalAttemptRecords is the total stored history count and attemptsTruncated: true means earlier records were omitted. attemptCount counts completed attempts whose result was applied to the delivery, so it can be lower than totalAttemptRecords when an in-progress or superseded attempt is retained.
Each attempt includes:
trigger-automaticormanual.statusand start/completion timestamps.durationMs.- the actual endpoint URL used for that attempt.
- safe request metadata.
X-Plextera-Signatureis shown as[redacted]; the secret and computed signature are not exposed in captured request headers. Treat the endpoint response body as opaque endpoint-controlled text. - the endpoint’s HTTP status and up to the first 16,000 characters of its response body.
- a structured
errorwith a category, code, and message when delivery failed.
The response object is omitted when Plextera received no HTTP response, for example after a DNS, TLS, connection, timeout, or endpoint-configuration failure. The error.category distinguishes those cases.
Delivery details can contain the original event payload and response data from your endpoint. The API returns them with Cache-Control: no-store; avoid copying them into logs that are accessible more broadly than the source data.
Resend an event manually
You can resend any delivery, including one that is already delivered, pending, or retrying:
The endpoint returns 202 Accepted with a new delivery in pending state.
The original delivery is unchanged.
A manual resend:
- requires the original subscription to still exist and be
active; - creates a new
deliveryIdand setsresendOfDeliveryIdto the selected delivery; - keeps the same
eventIdand exact event payload; - uses the subscription’s current endpoint and signing secret;
- makes one HTTP attempt and does not start an automatic retry sequence if that attempt fails;
- creates another resend on every successful request, including concurrent requests.
A request can reach your endpoint even if Plextera does not receive its response.
A resend can also intentionally deliver an event that your endpoint already processed.
Keep the webhook handler idempotent and deduplicate using eventId.
Related reference
- Event Reference - webhook payload schemas and examples
- Event Subscriptions API - create and manage subscriptions, inspect events and deliveries, and resend deliveries