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.

GET List all webhooks


You can get all the webhooks in your workspace with the following URL request

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

Retrieves a list of webhooks in your workspace. By default, results are paginated with 50 rows per page. To view additional results, include the page parameter in your request URL.

                            Copy code
                            GET
                            https://www.webwork-tracker.com/rest-api/v1/webhooks?page={page}
                        

The response returns a json format. Below you can see an example of response structure.

                            Copy code
                            {
                                "max_rows": "{max_rows}",
                                "current_page": "{current_page}",
                                "total_pages": "{total_pages}",
                                "data": [
                                    {
                                        "id": "{webhook_id}",
                                        "url": "{webhook_url}",
                                        "events": [{webhook_events}],
                                        "token": "{webhook_token}"
                                    },
                                    {...}
                                ]
                            }
                        

GET Get a single webhook


If you need to get information regarding a specific webhook, you need to add the {webhook_id} at the end of the URL

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

The response returns a json format. Below you can see an example of response structure.

                            Copy code
                            {
                                "success": true,
                                "data": {
                                    "id": "{webhook_id}",
                                    "url": "{webhook_url}",
                                    "events": [{webhook_events}],
                                    "token": "{webhook_token}"
                                }
                            }
                        

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}"
                            }