Unlock Sentinel · Automatic Delivery Guide

Webhook

Upload completed recordings to your own receiving service. Prepare an endpoint, enter it in the app, then confirm receipt with a new recording.

This guide works offline. All example domains, tokens, events and data are placeholders, not working services or credentials.

1. Prepare a receiving endpoint

The receiver must support POST + multipart/form-data file uploads. This can be your own server endpoint or an automation service that explicitly accepts this format.

Example: https://hooks.example.com/unlocksentinel. http:// URLs are also supported.

HTTP sends the video and Bearer token in plain text. Use HTTPS across the public internet.

A generic bot or platform Webhook URL may not work. The app sends a fixed file upload format. It does not convert requests into platform-specific JSON, signatures or message cards.

If you do not already have a receiver

  1. Create an upload route in a service you manage. Parse the event and video fields described below.
  2. If authentication is required, configure a token on the server and check Authorization: Bearer … in each request.
  3. Deduplicate by event ID and save both the file and event record. Return 200, 201 or 204 after successful receipt.
  4. Configure the domain, certificate, upload limit and timeout, then use curl below to check the endpoint. A local network address works only when the phone can reach that network.

Enter the complete final upload URL. The receiver must not redirect to a login page or rely on an HTTP → HTTPS redirect or a redirect that adds a trailing slash.

2. Enter two settings in the app

Open Automatic Delivery, select Webhook, then enter:

Upload URL
The receiver's complete http:// or https:// URL, such as https://hooks.example.com/unlocksentinel. Do not embed a username or password in the URL.
Bearer token (optional)
Enter only the token agreed with your server, such as EXAMPLE_BEARER_TOKEN. Do not include the Bearer prefix; the app adds it. Leave this empty if your receiver does not require a token.

First turn off “Include Current Location” to check basic delivery. If you need location, enable it through the app's normal permission flow afterward. A location failure does not prevent a video send attempt; a location-unavailable note is included instead.

After changing the endpoint or channel, test with a new recording. Old jobs are not redirected to the new destination. Videos saved while local-only mode was selected are not automatically uploaded.

3. Confirm actual receipt

  1. Confirm your license is valid and protection is enabled. Make a short test recording on your own device and let it finish normally.
  2. Check delivery status in the app. provider_accepted means the receiver returned HTTP 2xx. It does not confirm that a downstream bot, storage system or person received it.
  3. Find the same eventID at your receiving service. Confirm that the JSON and video were saved, and that the video is nonempty and plays correctly. If the service forwards it, check the final destination too.

A Webhook is accepted when there is no network error and the status code is 200–299. The response body may be empty. The app does not inspect success fields such as {"ok":true}. Even if the body says failure, a 2xx response is recorded as accepted.

Return 2xx only after genuine successful receipt; return an appropriate non-2xx status on failure. All redirects are refused, including redirects within the same domain.

4. Receiver protocol reference

This section is for endpoint development and integration. If someone else runs your service, ask them to confirm support for this format.

event: JSON form field
Uses application/json. It contains only the required event identifier eventID, the queue creation Unix timestamp in seconds createdAt, and optional locationText when the user enables location. It does not include device or recording diagnostics.
video: file form field
The filename is <eventID>.mov or <eventID>.mp4, with video/quicktime or video/mp4 respectively. The field contains the file itself, not a download URL or Base64 JSON.
Optional location text
When enabled and eligible for this send, event may also have a top-level locationText with a map link, time, accuracy or a location-unavailable note. Do not treat this as a fixed latitude/longitude object.

Complete JSON example without location. Enabling location adds only the optional locationText:

{
  "eventID": "00000000-0000-4000-8000-000000000001",
  "createdAt": 1760000000
}

The app also sends these headers. Authorization is omitted when the token is empty:

Content-Type: multipart/form-data; boundary=UnlockSentinel-<eventID>
X-UnlockSentinel-Event-ID: <eventID>
Idempotency-Key: unlocksentinel/<eventID>
Authorization: Bearer EXAMPLE_BEARER_TOKEN

An idempotency key alone does not implement deduplication. Store results by event ID and return the same result for duplicate events to avoid duplicate storage or forwarding.

Check your endpoint with curl

Prepare a small sample.mov on your computer. Replace the URL and example token before running this command. Remove the corresponding --header line if no token is required. Use a new event ID for each new test.

curl --include --request POST \
  'https://hooks.example.com/unlocksentinel' \
  --header 'Authorization: Bearer EXAMPLE_BEARER_TOKEN' \
  --header 'X-UnlockSentinel-Event-ID: 00000000-0000-4000-8000-000000000001' \
  --header 'Idempotency-Key: unlocksentinel/00000000-0000-4000-8000-000000000001' \
  --form 'event={"eventID":"00000000-0000-4000-8000-000000000001","createdAt":1760000000};type=application/json' \
  --form 'video=@./sample.mov;type=video/quicktime;filename=00000000-0000-4000-8000-000000000001.mov'

curl generates the multipart boundary. Do not override Content-Type or add -L to follow redirects. This checks only the endpoint; also complete an end-to-end check with a new recording from the app.

5. Limits, retention and troubleshooting

The local Webhook limit is 256 MiB (268,435,456 bytes) per video. Your service, reverse proxy or gateway may allow less. The multipart request also includes event JSON and boundaries, so do not set the server's request limit to exactly the video size.

Successful upload does not delete the local recording. Failed jobs and videos are retained. The app does not generate cloud links for oversized videos.

401 / 403
Check that the tokens match, that you did not include the Bearer prefix, and that the endpoint does not require another authentication format unsupported by this app.
404 / 405 / 415
Check the path, POST method and multipart support. An endpoint that only accepts a platform's specific JSON cannot be used directly.
413 or file too large
Use a shorter test recording. Check upload limits at the gateway, proxy and backend; increasing just one limit may not solve it.
redirect_refused
Enter the final URL without a login redirect, HTTP upgrade redirect or trailing-slash redirect.
Certificate, DNS or connection failure
Confirm the phone can reach the endpoint and that HTTPS has a valid certificate chain matching the hostname. Access from a computer does not prove access from the phone's current network.
Unknown result or automatic retries stopped
A connection failure or timeout may happen after the server receives the video. Check the receiver by event ID first. The app avoids blind retries without a reliable idempotency agreement. Location-bearing requests also stop automatic retries after an unknown submission result to avoid duplicate sends.
Destination changed
Old jobs retain their original destination snapshot. Configure the current URL and test with a new recording; old videos are not automatically sent to the new address.

Automatic delivery also requires enabled protection and a valid license. If the receiver accepted the request but no downstream message arrived, inspect its own save, forwarding or notification logic.