Webhooks
Webhooks to be notified about Task status changes
You can configure webhook endpoints to be notified about Task status changes.
Event Object
The webhooks return an Event object**,** with the following attributes
- type : event type (ex:
task.completed
) - data : event payload
- task
- id : task id
- status : the new task status
- info
- any additional info from the task’s
integrations
information
- any additional info from the task’s
- task
- sentAt : datetime at which the webhook is sent
Event types
We currently support the following webhooks
-
on_assign : when a Task goes from
TODO
→ASSIGNED
status→ type
task.assigned
-
on_unassign : when a Task goes from
ASSIGNED
→TODO
status→ type
task.unassigned
-
on_start : when a Task goes from
ASSIGNED
→STARTED
status→ type
task.started
-
on_pause : when a Task goes from
STARTED
→ASSIGNED
status→ type
task.paused
-
on_complete : when a Task goes from
STARTED
→DONE
status→ type
task.completed
Registering a webhook
- Register the webhook on your Fragment account, and write down the ID. For example
webhook_1234
(for now, you need to ask someone from the Fragment’s team to do it for you) - Add the webhook’s ID to the task
integrations
payload as follows
The externalId
will be returned as part of the webhooks
Example
- Create a webhook receiver endpoint on https://webhook.site
- Register it with ID
webhook_1234
- Create a task with the integrations information (see above)
- Use Fragment to assign or start the task
- Go back to your webhook, you should see a new payload