NOTE: This is a technical resource that requires development to implement.
To receive new and updated lead records from Brivity and apply them to your application, you will set up a subscription in Brivity. The Brivity API provides a subscription endpoint. This endpoint enables you to subscribe to be notified of a new_lead or an update_lead event at a specified callback URI. You only need to subscribe once, and your subscription will be created and saved.
Here is a link to the API docs:
Brivity API requires the following headers for the Event Subscriptions method:
The Authorization Token is the unique API key assigned to each Brivity account. By using the unique token assigned to each Brivity CRM account, new lead notifications are associated with the correct account.
To get the API key, you will need to have access to an active Brivity CRM account. Login to the business > account page in the Brivity CRM dashboard: https://www.brivity.com/account/business
Here you will see the unique API key for the account:
For the purpose of illustration, I am going to use Postman to set up a subscription. Here is the header configuration in Postman. Notice the access URL. Your API key is part of the Authorization Value as seen below:
Next, we will look at the structure of the POST body. Two elements are required in the POST body, the event and the target_url.
The event can be set to either "new_lead" or "update_lead". If you only want to receive lead information when a lead is created in Brivity, then use "new_lead". To receive lead information both when a lead is created and when an existing lead is updated, use "update_lead".
The target_url is the URL to which the subscriber will be sent events. In this example, I am using a test hook set up in Zapier. It is advisable to set the source value as your company or application name. Please refer to the API docs for a description of all the available elements. Here is my header setup:
Ok. Now I'll send the POST request. Once that's done, the API will return the following object with a 201 Created message:
My subscription is set up!
Testing the Subscription
Now to test it. I'll create a new lead in Brivity and monitor my webhook. Done! Here are the available fields that my webhook received:
You can set up your application to consume any of these elements.
Hope this has been helpful!