How do I set up APIs and Webhooks?

You can generate API keys and create webhooks for your buildings from the web dashboard.

To generate an API key, follow the steps given below:

1. Click on 'Settings' from the side menu of the web dashboard. 

2. From the 'Settings' page, click on 'API & Webhooks'. 

3. Once in the 'API & Webhooks' section, click on the + icon next to 'API Keys' to generate an API key. 

4. In the pop-up menu, select the building for which you need an API key generated and then click on 'Generate API Key'.

5. Once the key is generated, make sure you copy and save it. You can copy the key by clicking on the 541d43b6-3cf9-4440-894f-5b8e99341310 icon next to the key. Once you have copied and secured your API key, click on 'I've Saved my API Key'.


Note: Kindly ensure that you save and secure your API key as you will only be able to view it once. In case you were not able to save your key, you can always generate a new API key.


To create a Webhook, follow the steps given below: 

1. Click on 'Settings' from the side menu of the web dashboard. 


2. From the 'Settings' page, click on 'API & Webhooks'.

3. Once in the 'API & Webhooks' section, click on the + icon next to 'Webhooks' to create a webhook. 

4. Inside the pop-up menu, select from the dropdown menus the 'Event' and 'Mode' for which the webhook will be used, and add the endpoint URL. You can also enter an email to receive webhook notifications. 

5. Once you have selected the event, mode, and added an endpoint URL, click on 'Generate Webhook'.

Once you have set up API keys and Webhooks, you can view their usage stats and quotas from the 'API & Webhooks' section of the web dashboard. 

In case of any difficulty, reach out to us at support@packagex.io and we will be glad to assist you.