Webhooks


Use this REST API to manage and administer your webhooks.
With this resource, you can register callback URLs to receive real-time event notifications from our platform. Once registered, you’ll automatically receive notifications whenever new events occur—such as data updates, member actions, or system alerts.
Below we provide examples of the data required for each scenario and how to handle the incoming requests.

POST Create a webhook


You can create a new webhook using POST method and adding all necessary parameters to request body.

Copy codePOSThttps://www.webwork-tracker.com/rest-api/v1/webhooks

Include one of the following content types in your request header:

                            Copy code
                            Content-Type: application/x-www-form-urlencoded or application/json
                        

Below you can see all parameters that you can pass to request body

Property name Type Is required
url string Yes
events array Yes
Available Events
Event Name Description
tracker.started Emitted when a member starts tracking time
tracker.stopped Emitted when a member stops tracking time

Additional events will be introduced in future updates.

i The returned response includes a success property that indicates whether the webhook was successfully created. If it’s true, the response also provides the new webhook’s details, such as its ID, URL, and event type.

                            Copy code
                            {
                                "success": "{success_of_the_request}"
                                "webhook": "{webhook_array}"
                            }
                        

PUT Update a webhook


To update a webhook, you should send a request to the same URL using PUT method and adding a {webhook_id} at the end of it, as shown in the exampl

Copy codePUThttps://www.webwork-tracker.com/rest-api/v1/webhooks/{webhook_id}

Include one of the following content types in your request header:

Copy codeContent-Type: application/x-www-form-urlencoded or application/json

The list of parameters you can give to body

Property name Type Is required
url string Yes

The list of available values you can see below

Property name Value
url https://example.com/webhook/endpoint
events ["tracker.started", "tracker.stopped"]

The returned response includes a success property which contains your request success value.

                            Copy code
                            {
                                "success": "{success_of_the_request}"
                            }
                        

DELETE Delete a webhook


To delete a webhook, you should send a request to the same URL using DELETE method and adding a {webhook_id} at the end of it, as shown in the example.

Copy codeDELETE https://www.webwork-tracker.com/rest-api/v1/webhooks/{webhook_id}

The returned response includes a success property which contains your request success value.

                            Copy code
                            {
                                "success": "{success_of_the_request}"
                            }