Webhook Events
Webhooks can subscribe to various events that trigger requests to your endpoints.
You can setup as many webhook endpoints as you need. Each endpoint can subscribe to one or more events. Therefore you could have one endpoint that handles all events or a separate one for each, or group related events into their own webhook endpoints.
Available Events
As activity occurs in your organisation's Claimable account, we will make a HTTP request to your webhook endpoint/s when any of the following events happen. All are optional, but there must be at least one event per endpoint to trigger requests.
Webhook events can be triggered from the following sources and this can be defined on a per-endpoint basis.
Source | Use Case | Example |
---|---|---|
UI+API | When you want to receive webhook events for ALL activity regardless of the source. This will fire webhook events both from user activity AND changes made via our API. | You make an API call to add a label to a claim and still want to receive the claim.label.added webhook event. |
UI Only | When you want to exclude changes you make via our API and ONLY receive webhook events for user activity. | A user adds a label to a claim and you want to receive the claim.label.added webhook, but you DON'T want to trigger the webhook when adding a label via an API request. |
Claims:
Event Name | Description |
---|---|
claim.created | When a claim is created. |
claim.closed | When a claim's status becomes "closed". |
claim.reopened | When a claim's status becomes "open", after previously being "closed". |
claim.assigned | When a claim is assigned to a user. |
claim.unassigned | When a claim is unassigned and is no longer assigned to anyone. |
claim.switched_type | When the claim's type is changed to another claim type. |
claim.deleted | When the claim is permanently deleted. |
claim.label.added | When a label is added to a claim. |
claim.label.removed | When a label is removed from a claim. |
claim.damage.created | When a damage is added to a claim. |
claim.damage.deleted | When a damage is deleted from a claim. |
claim.note.created | When a note is added to a claim. |
claim.note.deleted | When a note is deleted from a claim. |
claim.document.created | When a document is uploaded to a claim. |
claim.document.deleted | When a document is deleted from a claim. |
claim.payment.created | When a payment is added to a claim. |
claim.payment.deleted | When a payment is deleted from a claim. |
claim.supplier.appointed | When a supplier is appointed to a claim. |
claim.supplier.unappointed | When an appointed supplier is removed from a claim. |
claim.contact.added | When a contact is added to a claim. |
claim.contact.removed | When a contact is removed from a claim. |
claim.task.created | When a task is created on a claim |
claim.task.deleted | When a task is deleted from a claim. |
claim.task.completed | When a task is completed by a user. |
claim.task.reopened | When a task is re-opened by a user (after previously being completed). |
claim.task.assigned | When a task is assigned to a user. |
claim.task.unassigned | When a previously assigned user is removed as the assignee of a task. |
Contacts:
Event Name | Description |
---|---|
contact.created | When a contact is created. |
contact.deleted | When a contact is deleted. |
contact.label.added | When a label is added to a contact. |
contact.label.removed | When a label is removed from a contact. |
contact.note.created | When a note is added to a contact. |
contact.note.deleted | When a note is deleted from a contact. |
contact.document.created | When a document is uploaded to a contact. |
contact.document.deleted | When a document is deleted from a contact. |
Companies:
Event Name | Description |
---|---|
company.created | When a company is created. |
company.deleted | When a company is deleted. |
company.label.added | When a label is added to a company. |
company.label.removed | When a label is removed from a company. |
company.note.created | When a note is added to a company. |
company.note.deleted | When a note is deleted from a company. |
company.document.created | When a document is uploaded to a company. |
company.document.deleted | When a document is deleted from a company. |
Contact Support to Setup Your Webhook Endpoints
Please contact us via the support chat or email [email protected] to request one or more webhook endpoints to be configured on your account. For each endpoint, please provide the following information:
- The URL of your endpoint. And;
- The events you'd like it to be subscribed to.
Webhook Request Payload
When we send a request to one of your webhook endpoints, we include information about what triggered the event, in both the JSON payload as an event_name
attribute and as a HTTP Header called Event-Name
.
In the response payload we also include metadata about who triggered the event and whether it was via the API or from user activity in the Claimable user interface.
Event Metadata Attributes
For every request we make to one of your webhook endpoints, we include the object that is the subject of the event (e.g. claim, contact) in addition to the following metadata:
Attribute | Body / Header | Description |
---|---|---|
event_name | Body + Header | Describes the event that occurred to trigger the webhook request. The value will be one of the strings listed in the table of events above. |
source | Body | Either "ui", meaning a user triggered the event through the user interface, or "api" which means the event is the result of an API call. |
performed_by | Body | If source is "ui", we include performed_by.user_id and performed_by.name attributes to describe the user who performed the event.If source is "api" only performed_by.name is included which refers to the name of the API token used to perform the action. |
Examples of JSON Payload
For the claim webhook event "claim.assigned", performed by a user via the UI:
{
"claim": {...} // Claim object
"event_name": "claim.assigned",
"source": "ui",
"performed_by":
"user_id": 2642
"name": "John Smith"
}
}
For the claim webhook event "claim.created", performed via the API:
{
"claim": {...} // Claim object
"event_name": "claim.created",
"source": "api",
"performed_by":
"name": "Mobile App API Token"
}
}
For the contact webhook event "contact.created", performed by a user via the UI:
{
"contact": {...} // Contact object
"event_name": "contact.created",
"source": "ui",
"performed_by":
"user_id": 2642
"name": "John Smith"
}
}
Example of HTTP Header
For the claim webhook event "claim.created":
Event-Name: "claim.created"
Updated 11 months ago