Filmsquare HelpDocs

Connect your tools

How do I get a webhook when a take is ready?

Updated .md

On this page
  1. Subscribe
  2. Events
  3. Check and answer

A webhook sends an event to your URL when a take finishes, a take is picked or a new version arrives, so you do not have to poll. Webhooks are set up through the API by a producer or owner. There is no screen for them in the studio.

Subscribe #

Send a POST to /v1/workspaces/{ws}/webhooks with your url and the events you want, or ["*"] for all. The answer holds a secret once: store it, because you need it to check every delivery. The URL must be an http or https address on a public host. You need a key: see how to get an API key. The request is in the docs under subscribe.

Events #

Four events exist: generation.succeeded, generation.failed, take.selected and asset_version.created. Events about takes in a person's private sketchbook are never sent. The fields of each are in the data of each event.

Check and answer #

Every delivery carries an x-fs-signature header: sha256= plus the hex HMAC-SHA256 of the raw body, keyed with your secret. Reject a delivery whose signature does not match; the code is in check the signature.

Answer with any 2xx status, quickly. A 5xx, a 429, a timeout or a network error is retried with backoff, up to 8 attempts. Any other 4xx ends the delivery. A delivery can arrive more than once, so use x-fs-delivery to skip an event you already handled.

Email us