How to connect a case system, an evidence store or a claims pipeline to Veriframe, so that a CCTV export goes in at one end and playable MP4 lands against the right matter at the other. The requests first, in any language, then the decisions that are yours.
This is the guide; the API reference is the detail. The reference lists every call, field and error code. Read this page to see how they fit together, then keep the reference open while you build.
That is the whole integration. There is no SDK to install and nothing to host: every step is an HTTPS call with JSON in and out.
Authorization: Bearer vfk_….These are the requests in the order they happen. They are plain HTTPS, so they work from any language, an integration platform, or a tool such as Postman or curl.
POST https://veriframe.co.uk/job
Authorization: Bearer <your API key>
Content-Type: application/json
{"label": "claim 4471"}
201 Created
{"job_token": "<long secret>", "url": "https://veriframe.co.uk/job/<job token>",
"ref": "a1b2c3d4e5f6", "expires_after_hours": 24}
Save job_token. It is shown once, and it is the address of everything
that follows.
Either point us at a link:
POST https://veriframe.co.uk/job/<job token>/source
Content-Type: application/json
{"source_url": "https://your-storage.example/export.zip"}
or upload the file, in pieces of up to 64 MB, each with the position of its first byte, and then say how big the whole file was:
PUT https://veriframe.co.uk/job/<job token>/upload
X-Upload-Offset: 0
X-Upload-Name: export.zip
<the first 64 MB of the file>
POST https://veriframe.co.uk/job/<job token>/upload/done
Content-Type: application/json
{"total": 129934409}
GET https://veriframe.co.uk/job/<job token>/status
Accept: application/json
200 OK
{"ref": "a1b2c3d4e5f6", "state": "ready", "cameras": 16, "error": null, …}
Repeat until state is ready, or failed with the
reason in error.
GET https://veriframe.co.uk/job/<job token>/download
Accept: application/json
202 means the zip is still being packed, so ask again in a few seconds.
200 is the zip. The certificate is a separate PDF:
GET https://veriframe.co.uk/job/<job token>/certificate
POST https://veriframe.co.uk/job/<job token>/delete
Accept: application/json
Try it in Postman. Download the
Veriframe Postman collection and import it. Paste
your API key into the collection's api_key variable, then send the requests
from the top. Creating the job saves its token for you, so every later request already
points at your job.
Postman sends a file as one piece, which covers exports up to 64 MB. For a larger export, use the link request in Postman, or split the upload in your own code.
The rest of this page is about choosing the version of each step that suits your system.
| Secret | What it does | How to treat it |
|---|---|---|
API key (vfk_…) | Creates jobs, lists them and reads your balance. It cannot open a job's footage. | One per system. Rotate it from your account whenever you like; revoke it there at once if it leaks. |
| Job token | Is the job: upload, status, download, watch, delete. Returned once, when the job is created. | Store it like a password, against the matter. We keep only a hash, so we cannot give it to you again. |
Log the ref, never the token. The ref is a
short identifier that is safe in logs, emails and support requests. A job token in a log
file is the footage in a log file.
| Route | Use it when | Notes |
|---|---|---|
| Upload | The export is on your own disk or arrives through your own upload form. | Chunks of up to 64 MB, each sent with its offset, in any
order and in parallel if you like. A failed chunk is simply sent again.
upload/done refuses a gap instead of converting half a recording. |
| Link | The export already sits in cloud storage, or the sender gave you a share link. | One call: POST /job/<token>/source
with source_url. The link must download without a sign-in or a password.
Share links from WeTransfer, Box, Dropbox, Google Drive and OneDrive are understood. |
The largest export we accept is 35 GB. If a job fails you can give the same job another source, up to five attempts in all, so a wrong link does not cost you the job.
Polling is step 3 above, and it is enough for a batch job. Ask /status every five to ten seconds, not faster; if you are ever
answered 429, wait for the number of seconds in Retry-After.
Callbacks suit a server. Add a callback_url when you
create the job and we POST an event to it when the job is ready, has failed, has been
sent to storage or has been deleted. The response to creating the job then includes a
callback_secret: save it with the job token, because it is how you tell a
genuine event from a forged one.
To check an event, in whatever language your server is written in:
X-Veriframe-Timestamp header.., body.callback_secret as
the key, and write it as lower-case hexadecimal.sha256= in front. The result must equal the
X-Veriframe-Signature header. Compare with your language's
constant-time comparison if it has one.Known values to test your code against. With this secret, timestamp and body, your code must produce this signature:
| Item | Value |
|---|---|
| Secret | whsec_example_secret_do_not_use |
| Timestamp | 1793058000 |
| Body | {"event":"job.ready","ref":"a1b2c3d4e5f6","label":"claim 4471","state":"ready","cameras":16,"bytes_out":3919000000,"error":null,"at":1793058000} |
| Signature | sha256=95ae8e98a7fc29413ddce834c03c8ce49c332283658f16339737942ba8d40d65 |
2xx and do the work
afterwards. We wait ten seconds, try three more times over about two and a half
minutes, and then stop.GET /jobs?state=ready now and then to
catch anything you missed.ref and your label, never the job
token. Look the token up in your own records.| Option | What happens | Good for |
|---|---|---|
| Download | One zip: an MP4 per camera, a self-contained
player.html and the conversion certificate. The first request answers
202 while the zip is packed; ask again. | Filing the footage in your own document or evidence store. |
| Send to storage | POST /job/<token>/send
with a Box or Dropbox upload link (a “File Request”). We put the files
straight into that folder and check each one as it arrives. | Delivering to a third party who has asked for the footage in their own storage. |
| Share the job page | The url returned when
the job was created opens the footage in a browser, all cameras on one timeline. The
viewer needs no account and nothing installed. | Letting a fee earner, handler or investigator watch it today. |
The job page link contains the job token, so anyone holding it can watch, download and delete. Send it only to people who should have all three.
POST /job/<token>/delete deletes it now.So collect the result as part of the same workflow that started the job. An integration that converts overnight and collects “when someone opens the matter” will find the footage gone. If that happens, start a new job from the original export, which you should still hold.
| You see | It means | Do this |
|---|---|---|
401 | The key is missing, wrong or revoked, or the account is suspended. | Do not retry. Check the key in your account. |
402 on creating a job | The data balance is empty. | Top up.
GET /account tells you in advance with can_start_job. |
409 on upload/done | A chunk is missing. The body lists the byte ranges we hold. | Send the missing ranges and call it again. |
429 | Too many requests. | Wait for
Retry-After seconds, then carry on. |
503 on creating a job | The service is at capacity. | Try again in a few minutes. Nothing was charged. |
State failed | The conversion did not complete.
error is a sentence a person can read. Credits are returned. | Show the sentence to your user. If it says the format was not recognised, tell us: that is how formats get added. |
404 on a job call | The token is wrong, or the job has been deleted. | Check GET /jobs for its state; start a new job if the
footage is still needed. |
A program that sends JSON is answered in JSON. For calls with no body, send
Accept: application/json, because the same addresses also serve a web page
to a person.
GET /jobs lists your organisation's jobs with their state, times, sizes
and your labels, and GET /account gives your data balance. Use the first
to reconcile what you sent against what was converted and deleted, and the second to top
up before a batch is refused. Put your matter or claim number in label when
you create the job and you can find it again with GET /jobs?label=….
202 on
the download.error to a person who can act on it.Building this for a product other people will use? Tell us what you are connecting and which recorders your customers meet. We will check the formats convert before you write any code.