Webhook Subscriptions

Webhooks allow integrated applications to be notified when an event occurs in VOCUS. This functionality is currently available for FlightRisk Risk Assessments.

/WebhookSubscriptions/

HTTP POST Service Account

Creates or updates a webhook subscription. The subscription is automatically scoped to the domain to which the service account belongs, and will only notify the callback URL for events within the service account's scope.

The subscription's properties may be updated at any time by calling this endpoint. This will not create a different subscription.

Input

Field Type Constraints Detail
eventNames String Array Required Supported Values:
  • FlightRisk.RiskAssessmentExecuted
url String Required A publicly-routable URL for VOCUS to call when the event occurs.
sharedSecret String Required 64-1024 The value that VOCUS will use to sign the authorization header when calling the URL. This value should be cryptographically random, and may be rotated at any time by calling this endpoint.

Sample Payload

Output

See HTTP Response Codes

HTTP Status Data
200

Webhook Callback Details

When VOCUS notifies the callback URL, the request will follow a specific structure.

Request Structure from VOCUS

Authorization Header Details

The authorization header will be in this format: Authorization: Token <JWT_TOKEN>

The JWT token will be signed with the shared secret used to register the webhook subscription.

Token will contain claims:

Validation Process

To validate incoming webhook requests:

  1. Extract the JWT token from the Authorization header.
  2. Verify the JWT signature using shared secret.
  3. Check that the token has not expired.
  4. Extract the payloadHash claim.
  5. Compute the SHA-256 hash of the request body.
  6. Verify that the computed hash matches the payloadHash claim.
  7. Parse and process the JSON payload.

Retry Behavior

If the webhook endpoint returns an error or is unreachable, VOCUS will automatically retry the webhook delivery with the following schedule:

The total retry period spans approximately 8.5 minutes. After the final retry attempt, VOCUS will stop attempting delivery for that specific event.

Retries are only attempted for HTTP errors that suggest temporary problems (such as 5xx server errors or network timeouts). Authentication failures (4xx errors) will not be retried.

Sample Event Payload

When a FlightRisk.RiskAssessmentExecuted event occurs, the JSON payload will contain:

Error Handling

The webhook callback endpoint should:


/WebhookSubscriptions/

HTTP DELETE Service Account

Deletes a webhook subscription for all registered event types. The subscription is automatically scoped to the domain to which the service account belongs.


/WebhookSubscriptions/Test

HTTP POST Service Account

Sends a test payload to the subscribed webhook URL to verify configuration. A subscription must be created before calling this endpoint.

Input

Field Type Constraints Detail
payloadToEcho Object Required The test payload to send to the webhook URL.

Sample Payload

Output

See HTTP Response Codes

If the request is valid and no server errors occurred, the response status will be HTTP 200 even if the webhook invocation failed. Check the success property to see if invocation succeeded.

Field Type Detail
success Boolean Indicates if VOCUS received an HTTP success status code when invoking the subscribed webhook URL.
diagnostics Object Contains diagnostic information collected by the server.

API Version 15.0.9426.23016

Copyright ©2008-2025 Polaris Aero, LLC.