Coming Soon

Need to push / pull data that isn't listed yet? No problem! Contact our support team & we'll jump right on it.

Webhooks

Use webhooks to get an HTTPS post when data changes in the Firm App system.

Manage Webhooks
To setup a webhook, you'll need API permissions enabled for your role.

Webhooks will send a POST request to your URL along with the information on what data changed. You can subscribe to specific models (such as "Users") and to specific fields if needed.

If multiple documents are changed at the same time (e.g. a data import) then the system will attempt to batch those changes into a single webhook call to your URL.

Here is a sample of the POST request that you'll receive:

POST https://example.com/your_url
Content-Type: application/json

{
  "payload": {
    "date": "2024-07-22T08:28:25.995Z",
    "events": [
      {
        "action": "update",
        "schema": "user",
        "docId": "ussampleuser1id",
        "docUpdatedDate": "2024-07-22T08:28:25.995Z",
        "diff": {
          "name": "Sam Smith"
        }
      },
      {
        "action": "create",
        "schema": "user",
        "docId": "ussampleuser2id",
        "docUpdatedDate": "2024-07-22T08:28:25.995Z"
      },
      {
        "action": "delete",
        "schema": "user",
        "docId": "ussampleuser3id",
        "docUpdatedDate": "2024-07-22T08:28:25.995Z"
      }
    ]
  },
  "signature": "37dfc2b68318a23969fcb0ce5f26954fac3b1635979b2fbc7dbc3371f58a1a6a"
}

The payload of the webhook is signed so you can know for sure the data came from the Firm App system. To verify this signature, convert the payload to JSON then create an HMAC SHA-256 hex hash using the secret key provided on your webhook's page.

// Verifying the signature in NodeJS/Express
const secret = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
const signature = crypto.createHmac('sha256', secret)
      .update(JSON.stringify(req.body.payload))
      .digest('hex');
const isValid = signature === req.body.signature;

Next up, check out the Live Console »