Outbound webhooks
Webhooks notify an external application when events take place in the Pattern platform. This allows applications to take action, such as calling back into the Pattern API for group member or task data. Webhooks are managed in the Pattern administrative console.
Configure a webhook
To configure a webhook for a group:
-
In your group, on the left navigation bar, select Settings > Integrations > Webhooks
-
Select Add Webhook
-
In Name, enter a name for your webhook
-
In URL, enter the URL of the webhook endpoint. The URL must be encoded if it contains any special characters.
-
Optional: Disable the SSL Certificate Verfication slider to deactivate SSL Verification. Disabling this setting is useful for testing, but it is strongly recommended to enable in a production setting.
-
Optional: In Secret token, enter the secret token value that can be used to validate payloads.
-
In the Trigger section, select the avaiable trigger and choose the task type
-
Select Save
Configure your webhook receiver endpoint
All webhook endpoints should follow these guidelines:
-
Endpoints should quickly respond with a 200 or 201 status code: Avoid any heavyweight synchronous processing of the webhook request. Long running request-response cycles can lead to duplicate events getting sent.
-
Be prepared to handle duplicate events: In some circumstances, duplicates events can be sent. Be prepared to handle these gracefully.
-
Response bodies should be empty: The Pattern Health platform does not inspect responses back from the receiver endpoint, so we recommend an empty response body and keeping headers lightweight.
Test a webhook
You can trigger any webhook to validate that it working as expected.
To test a webhook:
-
In your group, on the left navigation bar, select Settings > Integrations > Webhooks
-
Select Edit on the Webhook you want to test
-
Under the Test Details section, select the Test button and choose which trigger type you want to test
-
The request and response details as well as any error details should be displayed just below the Test button
The results of a test are not persisted on the Pattern platform |