GUIDEcx, Inc. Webhooks API
*Note*: this is an experimental feature. Not all events documented here are fully supported yet and event payloads may change without notice. A webhook is a user-defined callback over HTTP. You can use GUIDEcx webhooks to notify your app or web application when certain events occur in GUIDEcx. For example, you might want to alert your remote application when an task is updated or when a project is created. Using a webhook to do this means that your remote application doesn't have to periodically poll GUIDEcx (via the REST APIs) to determine whether changes have occurred. A webhook in GUIDEcx is defined by the following information that you need to provide when registering (that is, creating) a new webhook: - A description for the webhook created (for example, "Webhook for my remote app"). - The URL where the callback should be sent. - The events to post to the URL. A simple webhook might look like this: - Description: "My simple webhook for project updates" - URL: https://www.myremoteapp.com/webhookreceiver - Events: project.updated A more complex webhook might look like this: - Description: "A slightly more advanced webhook" - URL: https://www.myremoteapp.com/webhookreceiver - Events: project.created,project.updated GUIDEcx will POST a JSON-encoded request to the provided URL. This request body will follow the same general format, with the `data` object being replaced with the resource-specific detail. - **id**: a unique identifier for this event. Useful for handling duplicates in your application - **time**: ISO-8601 timestamp of when the webhook was sent - **resourceId**: unique identifier of the resource that triggered the event. Reference the `event` to determine what type of resource (ie. project, task, etc) - **event**: event name that triggered the webhook. You can subscribe one webhook to multiple event types so this event name is a good resource for filtering your business logic in your app. - **changes**: only applicable for update events. Will be an array of changes made to resource fields. One change will be an object that looks like: **project.created** ``` { "id": "fa680903-ca46-45d3-b355-5e02fb6ba890", "event": "project.created", "resourceId": "4e16d172-21d2-4bd6-96e7-d240e703d137", "time": "2022-07-26T17:21:01.609000+00:00", "data": { "id": "4e16d172-21d2-4bd6-96e7-d240e703d137", "name": "Example Webhook", "status": "ON_TIME", "customer": { "name": "GUIDEcx", "domain": "guidecx.com" }, "projectManager": { "firstName": "Jane", "lastName": "Doe", "email": "jdoe@example.com" } }, "changes": [ { "field": "status", "old": "ON_TIME", "new": "LATE" } ] } ``` **project.updated** ``` { "id": "fa680903-ca46-45d3-b355-5e02fb6ba891", "event": "project.updated", "resourceId": "4e16d172-21d2-4bd6-96e7-d240e703d137", "time": "2022-07-26T17:21:01.609000+00:00", "data": { "id": "4e16d172-21d2-4bd6-96e7-d240e703d137", "name": "Example Webhook" }, "changes": [ { "field": "status", "old": "ON_TIME", "new": "LATE" } ] } ```