Search…
Webhooks
Get notified when something in Moment has changed.
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.

Current

    Claims
    Customers
    Invoices
    Offers
      Changes
      Decisions (Accepted/Declined)
    Projects
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.

Configuration

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/ .

How to use

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.

Example:

Invoice is finalized

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:
1
{
2
"event": "CREATE_NEW",
3
"invoice": {
4
"id": 106939080,
5
"invoiceNumber": 1,
6
"customer": {
7
"id": 62788973,
8
"customerNumber": "10001"
9
},
10
"project": {
11
"id": 62788980,
12
"projectNumber": "1"
13
}
14
}
15
}
Copied!
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:
1
https://app.moment.team/api/1.0/companies/{yourcompany}/invoices/10693908
Copied!
See the example for result in our swagger documentation here.
Last modified 2mo ago