Webhook: notify your own systems
Notify a system of your own with a signed HTTP call whenever media are delivered or removed in footage.one.
With a target of type Webhook, footage.one calls an address of your own system whenever media are delivered or removed. Your system then fetches the media itself through the REST API.
Setting up footage.one
- Under Distributions, create a new distribution with the target Webhook.
- Enter the Target URL, for example
https://partner.example/hooks/footage. - Under Credential, enter a secret of your choice. Your system uses it to verify the signature of every call. It is not a login.
The target URL must start with http:// or https:// and be publicly reachable. footage.one rejects addresses in your own network.
The call
footage.one sends a POST with Content-Type: application/json:
{
"schemaVersion": "v1",
"eventType": "asset.published",
"distributionId": "…",
"assetIds": ["…"],
"idempotencyKey": "…",
"publishedVersionAssetIds": { "<asset-id>": "<version-id>" }
}
| Field | Meaning |
|---|---|
eventType |
asset.published on delivery, asset.removed on removal |
assetIds |
The delivered assets |
idempotencyKey |
Unique per delivery. Use it to recognise duplicate calls |
publishedVersionAssetIds |
Which file version was delivered per asset, if versions exist |
Depending on the setup, there is one call per asset or one call for several assets together.
Verifying the signature
Every call carries two headers:
X-FootageOne-Signature: HMAC-SHA256 over the unmodified request body, keyed with your secret, Base64-encoded.X-FootageOne-Timestamp: the time of the attempt (ISO 8601). It is not part of the signature.
Example in Node.js:
import { createHmac, timingSafeEqual } from 'node:crypto';
function isValid(rawBody, signatureHeader, secret) {
const expected = createHmac('sha256', secret).update(rawBody).digest('base64');
return timingSafeEqual(Buffer.from(expected), Buffer.from(signatureHeader));
}
Compute the signature over the raw body bytes before you parse them as JSON. Even re-formatted JSON yields a different signature.
Response, time limits and retries
- Any response with status 2xx counts as success.
- Your system must answer within 10 seconds. Process the media in the background and answer right away.
- Redirects (3xx) are not followed and count as failures.
- On 4xx, footage.one does not try again. On 5xx and connection errors, footage.one repeats the call several times, for at most 45 seconds in total.
- A call can therefore arrive more than once. Recognise repeats by the
idempotencyKey.
Removing
When you remove assets from the distribution, footage.one sends a call with eventType: "asset.removed" to the same address. This call carries no asset IDs. Your system should then reconcile its holding with the distribution.