Event can be one of entry.created, entry.updated or entry.deleted. The entry key will contain the data of the corresponding entry. The structure of the entry data should remain stable but is currently a dump of the internal object used by Tempo and might be subject to change over time. Once I'm confident webhooks work as expected, I will freeze the changes so that webhooks handler don't break.
A note about CORS
Note that since the webhook is sent from a web browser, the browser will likely issue a preflight CORS request before the actual POST request is sent. Your webhook handler will need to answer this request with the appropriate headers, typically:
Access-Control-Allow-Origin: https://yourtemposerver
Access-Control-Allow-Methods: POST, OPTIONS
Access-Control-Allow-Headers: content-type
Fix #51, Instead of an empty body, we now post an event type and the associated entry. A typical webhook payload looks like this:
Event can be one of
entry.created
,entry.updated
orentry.deleted
. Theentry
key will contain the data of the corresponding entry. The structure of theentry
data should remain stable but is currently a dump of the internal object used by Tempo and might be subject to change over time. Once I'm confident webhooks work as expected, I will freeze the changes so that webhooks handler don't break.A note about CORS
Note that since the webhook is sent from a web browser, the browser will likely issue a preflight CORS request before the actual POST request is sent. Your webhook handler will need to answer this request with the appropriate headers, typically:
Otherwise, the webhook won't be sent.