list_events or wait_for_event. Your server can also receive each event as a webhook.
Only Admins can set up, test, rotate or remove the webhook. See Organizations and members.
Events
An event looks like this, and carries nothing else:
idcounts up by one for each event in your organization. A Member’s agent can see gaps inidwhere events belong to canvases it cannot see.atis milliseconds since 1970.- Events carry no answers, state values, comment text, names or emails. Fetch details with your API key, for example with
get_answers,get_canvas_state,list_commentsorget_canvas.
state.changed and comment.added mark the first change in a 5-second window. Later changes in the same window are not announced separately. Read the canvas a few seconds after the event to see them.
Events are kept for 30 days.
Pull events
Both are free.
An organization can hold 50 waits at once. Past that, a wait returns at once with whatever events exist, so pause briefly before calling again when a wait returns empty early.
Set up a webhook
- As an Admin, open Webhooks.
- Enter the Endpoint URL.
- Select Add endpoint.
- Copy the signing secret. It starts with
cvwhsec_and is shown only once.
https:// on port 443 or 8443 and a public host name. CanvasView refuses IP addresses, user names and passwords in the URL, localhost, and private names such as .local or .internal. It also refuses canvasview.dev addresses and names that carry an IP address, such as nip.io.
The Webhooks page shows the last success, the last failure and how many events are waiting to deliver. Select Send test event to send a test delivery, Rotate secret to get a new signing secret, or Remove endpoint to stop deliveries.
Deliveries
Each event is sent as:- Answer with any 2xx status within 10 seconds. The response body is ignored. Redirects are not followed and count as failures.
- Deliveries go out in order. A failed delivery is retried after 30 seconds, 2 minutes, 10 minutes and 1 hour, then hourly, for up to 24 hours. Later events wait behind it.
- A retried delivery carries the same
id. Store the IDs you have handled and skip repeats. - Send test event sends
{"id":0,"type":"webhook.test","canvasId":null,"at":...}.
list_events. Fix the endpoint, then save it again on the Webhooks page to turn deliveries back on. Deliveries restart with events that happen after you save. Read the ones you missed with list_events.
Verify the signature
TheCanvasView-Signature header holds t, a Unix time in seconds, and v1, an HMAC-SHA256 of <t>.<raw body> keyed with your signing secret, in hex.
- Read the raw request body exactly as received.
- Compute HMAC-SHA256 of
<t>.<body>with your signing secret. - Compare it with
v1in constant time. - Reject requests whose
tis more than five minutes from now.
Stripe-Signature header works once it reads CanvasView-Signature instead.