Webhooks can be used to notify your application when certain events occur in Swivle.
Example: You may want to alert and respond in your remote application when file metadata is updated or when a Shared Link is created.
When a defined event occurs, a HTTP POST with the event payload as a JSON body is sent to the URL that is configured in the Webhook.
Subscribing to events using a Webhook means that your application does not have to periodically poll the Swivle API to determine whether changes have occurred. A Webhook delivers data to other applications as it happens, meaning you get data immediately.
Webhooks can be configured in the Management Console. Included are all the events that can be received and detailed samples of the payloads that are delivered.
API Subscription
Making use of Webhooks requires a Swivle API subscription or a subscription plan that includes the API. You can buy your API subscription on the Subscriptions page in the Management Console.
When your API subscription expires, all Webhooks will be disabled until you activate a new API subscription.
Consuming a Webhook
You will need to set up a URL in your app that is accessible from the public web that can receive the HTTP POST of the Webhook.
In some cases you may want to build this yourself, but you can also use integration platforms such as Zapier to receive Webhooks and trigger automated actions.
Testing Webhooks
There are many free tools available to capture and inspect Webhook events for testing purposes, such as:
Retry policy
Swivle will retry anytime it does not receive what it considers a successful response from the destination server.
Below is a list of HTTP status codes that Swivle considers as successes and failures.
2xx | Not retried |
3xx | Not retried |
4xx | Retried |
5xx | Retried |
Timed Out | When 5 seconds |
In total, Swivle will try to invoke the Webhook destination 3 times when it keeps failing, so a maximum of 2 retries.
Securing your Webhooks
We recommend that you validate that Webhook requests are coming from Swivle. For more information, see Securing Webhooks in Swivle.
Comment
Do you have corrections or additional information about this article? Leave a comment! Do you have a question about what is described in this article? Please contact Support.
0 comments
Please sign in to leave a comment.