
A webhook is a method for applications to communicate with each other automatically. It allows you to subscribe to real-time notifications whenever a specific event occurs. Unlike traditional APIs that require polling for updates, webhooks push the information to your systems directly, ensuring instant and efficient data transfer.
For example, if an event happens within Data#3’s Enterprise Systems, such as a new invoice being issued, a webhook subscription can be set up to notify your systems instantly, allowing you to trigger behaviours such as uploading the details of the invoice to your accounting platform.
If you aren’t registered with MyD3 yet, please head to Getting Started and follow the steps to get registered and create an API Key.
You will also need a publicly facing web service that can receive notifications from the webhook system. This service will need to be accessible via the internet.
You will need to prepare a web-service that can receive REST requests. This service must be secured with TLS1.2 at minimum. Unsecured HTTP is not supported.
This service will need to be able to be accessible from the public internet.
When events occur, the MyD3 webhook notification system will send a POST to the URI you specify. The body of the POST request will contain content like the below
We recommend you authenticate calls to your web-service via an APIKey that can be included as a query argument in the notification URL of the subscription you create.
MyD3 does not support other authentication methods for Webhooks at this time.
To create a new subscription we’re going to be using the Webhook Subscription API. The full details can be found in the API Catalog.
1. Construct the HTTP POST Request detailing your subscription:
Use the following endpoint to create a subscription
POST https://api.myd3.data3.com/subscription/v1/subscription
Note that you will need to include an Authorization header that is populated with a valid accessToken prefixed with “Bearer”. For more information on getting an accessToken using your API Key please refer to “Getting Started”
The body of your request should look like the following
4. Send the HTTP Request:
Send a POST request to the subscriptions endpoint with the specified headers and request body.
5. Handle the Response:
Upon successful creation of a subscription, the endpoint will return 201 Created along with the created subscriptions GUID
Example Response (Success):
9ccbe7c2-00e7-44dd-8af7-885c44b4404f
Explore the Webhook Subscription API – here you’ll find additional endpoints that you can use to manage your webhook subscriptions, including endpoints to list all existing subscriptions or delete a subscription you no longer require.
All rights reserved © Data#3 Limited