Webhooks
If you're wondering what webhooks got to do with fingerprinting - it's a good question. Often nothing. However, there are situations where you need to collect the generated thumbmarks into your backend and you don't want to trust the front-end to send it. Webhooks can solve that.
For now, webhooks have a single event they support: thumbmark.success
. This event happens every time the API is used to process a thumbmark.
On a successful thumbmark generation, an event is sent to the webhooks you have specified.
The delay for the webhook varies. It could be immediate, but it can also take a little.
Format
The format is an array:
[
{
"timestamp":1756200078,
"eventName":"thumbmark.success",
"payload": {
"thumbmark":"xxxx",
"visitorId":"yyyy",
"components":{ ... }
"info":{ ... },
"classification":{ ... },
"uniqueness":{ ... },
"visitor":{ ... },
"requestId":"zzzz"
}
},
{ ... }, // might have multiple events
]
The following headers are set:
- **x-thumbmark-attempt**: number (max 3)
- **x-thumbmark-webhook-id**: you can use this to verify the call was sent from the webhook you've set
- **x-thumbmark-event-count**: number of events in this call
How it works
At the end of processing the thumbmark
, if webhooks are configured, the system sends an event forward for event processing.
Another function then processes the event queue and calls the webhook.
This is not a synchronous operation, and there can be a small delay. Also, order is not guaranteed. If your use-case requires something else, let us know.
If you want to test the webhooks in action, there are free tools you can find. I like webhook.site.