mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-24 19:59:02 +08:00
webhook docs for v2
This commit is contained in:
parent
9a615643ac
commit
cdfcefe206
@ -14,10 +14,17 @@ A sample payload of the webhook request looks like this:
|
||||
"time": // current time as ISOString (new Date()).toISOString())
|
||||
"tiptapJson": {}, // JSON output from Tiptap (see https://tiptap.dev/guide/output#option-1-json): TiptapTransformer.fromYdoc()
|
||||
"ydocState"?: {}, // optionally contains the entire yDoc as base64. Contact us to enable this property!
|
||||
"clientsCount": 100 // number of currently connected clients
|
||||
"clientsCount": 100,// number of currently connected clients
|
||||
"type": '', // the payload type (if the document was changed, this is DOCUMENT) ; only available if you are on webhooks v2
|
||||
"trigger": '' // what triggered the event (usually "document.saved") ; only available if you are on webhooks v2
|
||||
}
|
||||
```
|
||||
|
||||
### Signing
|
||||
|
||||
All requests to your webhook URL will contain a header called `X-Hocuspocus-Signature-256` that signs the entire message with your secret. You can find it in the [settings](https://collab.tiptap.dev/apps/settings) of your Tiptap Collab app.
|
||||
|
||||
### Changelog
|
||||
|
||||
v2: Version 2 adds the "type" and "trigger" field to the webhooks. Webhooks for threads / comments are going live soon, so before upgrading,
|
||||
make sure that you check the "type" field when processing incoming webhooks. You will want to check for type=DOCUMENT in order to keep previous behaviour.
|
||||
|
Loading…
Reference in New Issue
Block a user