Webhooks
Get notified when something in Moment has changed.
Last updated
Get notified when something in Moment has changed.
Last updated
Moment has a number of webhooks available for you to be used when there is a need to get information about changes happening in Moment.
Changes
Decisions (Accepted/Declined)
For all of these, when there are changes to object, the webhook is triggered. For offers there is also one specific to be triggered just when an offer is accepted or declined.
To take advantage of webhooks in Moment, go to Setup > Settings > Integrations. Click on the button "+ New integration".
Select the webhook that you want to use, these are listed one by one. In the example below, customers is selected. Enter the URL where you want the POST notification to be sent when changes occur.
Tip: An easy way of testing webhooks is to set up a temporary Request Bin on https://requestbin.com/ .
Moment will send HTTP POST messages to the URL that has been configured when any elements of the selected type is updated. The information provided is limited, but will give you enough information as to make an API call to fetch updated information.
A common use case for webhooks is when you want to register invoices in an accounting system as soon as they are finalized in Moment. After setting up the webhook integration, you will get a POST containing some basic information whenever an invoice is finalized:
You can use this information to update your accounting system by fetching the invoice data from our invoice API endpoint (see detailed documentation here), using the id from the webhook (106939080):
Create a GET request with this URL:
See the example for result in our swagger documentation here.