loading Loading...
add chat to your website

Webhooks


 

Intended audience

This document is intended for developers who wish to receive event notifications from ProProfs Project to their own application. Some familiarity with REST concepts and the ProProfs Project API is assumed.

 

Zapier Integration

We offer integration with hundreds of apps through Zapier, including many CRM's and billing platforms. If you are not a developer, we suggest using this tool to help with your integrations.

 

What Are REST Notification Hooks?

REST Notification Hooks, or Webhooks, are a way for ProProfs Project to tell your application when some event has happened. It will also supply a resource to allow you to fetch the new data via the REST API.

 

This avoids your application contacting the ProProfs Project API every x minutes to see if anything has changed. i.e. removes the need to poll the ProProfs Project API.


A list of supported events can be found towards the end of this document.

 

Further reading


When to Use Them

As an example, if your app needs to know when a new calendar event has been added in ProProfs Project then your app can send a subscribe request to the 'new_event' hook and when the user adds a new calendar event a REST notification will be sent to your app.

 

This avoids the overhead of your app repeatedly polling ProProfs Project thus reducing the load on your server as well as the ProProfs Project server.

 

How Does it Work?

Step 1

Your app sends a subscription request to ProProfs Project. This contains the event you are interested in and a unique url that ProProfs Project will send notifications to.

 

Step 2

When the event occurs (e.g. an event is added to the calendar) then ProProfs Project will send notification to the unique url given in step 1. The notification contains a ProProfs Project API url which references the new resource. e.g. https://api.projectbubble.com/v2/events/12345

 

Step 3

Your app can now fetch the new data using the url given in step 2.

And that's it!

 

Example Using cURL

This shows a subscription to the 'new_event' hook. This is triggered when a new event is added to the calendar. The key and domain are just placeholders so replace these with your credentials.

 

Step 1 - Subscribe

curl -X POST https://api.projectbubble.com/v2/hooks
-H "key:27838413e610417bd866352767fe322ca97d94c8"
-H "domain: mydomain.projectbubble.com"
-H Content-Type: application/json
-d '{"target_url": "https://yourapp.com/<unique_target_url>", "event": "new_event"}'

 

Upon successful subscription ProProfs Project will return JSON with a unique subscription id as shown below. Your app should store this id as it's used for unsubscription.

{
    "id": "897236485762347563485"
}

 

ProProfs Project Response Codes:
201 - Subscription created OK
400 - Incorrect field data sent / invalid event
401 - Authentication issue
409 - Target url is not unique

 

Step 2 - Event occurs and ProProfs Project sends notification to your app

curl -X POST  https://yourapp.com/<unique_target_url>
-H Content-Type: application/json
-d {"resource_url": "https://api.projectbubble.com/v2/events/123456"}

 

Your app should return one of the below responses:

200 - OK
401 - Unsubscribe. ProProfs Project will immediately unsubscribe your app from this event.
Anything Else - ProProfs Project will assume failure so will wait and retry sending again. After 3 failures you will be unsubscribed from the event. See below for more details on unsubscribing

 

Step 3 - Your app fetches the new data from ProProfs Project API

curl -X GET https://api.projectbubble.com/v2/events/123456
-H "key:27838413e610417bd866352767fe322ca97d94c8"
-H "domain: mydomain.projectbubble.com"
-H Content-Type: application/json

 

ProProfs Project responses:

200 - OK
401 - Authentication/Permission issue
404 - Resource not found

 

Unsubscribing

You can unsubscribe from an event by sending a DELETE request as shown below.

curl -X DELETE https://api.projectbubble.com/v2/hooks/<subscription_id>
-H "key:27838413e610417bd866352767fe322ca97d94c8"
-H "domain: mydomain.projectbubble.com"

 

ProProfs Project Responses
200 - OK
401 - Authentication/Permission issue
404 - Subscription not found

 

Events

Completed Subtask - completed_subtask
Completed Task - completed_task
New Client - new_client
New Event - new_event
New Project - new_project
New Subtask - new_subtask
New Task - new_task

 

Other Information

  • All data is exchanged using JSON
  • Events are tied to the subscribed user API key. So, for example, only calendar events created by the subscribed user will trigger the event notifications.
  • ProProfs Project does not include authentication when sending event notifications to your app. We recommend you use long and complex unique identifiers as the target urls that your app generates. As an extra precaution, you should check that the POSTed resource_url is actually a ProProfs Project url.

‚Äč