Skip to content
Docs
Get started

API reference

Custom templates

Define your own Verilo verification template through the API or the dashboard: choose the capture steps, the words the phone shows and what each step is checked against.

When no built-in template fits, define your own from the seven step kinds. A custom template is checked by the same engines and decided by the same rule as a built-in one, and held to the same rules: a step can be checked only against a reference its kind reads.

Create one

curl https://api.verilo.app/v1/templates \
  -H "Authorization: Bearer $VERILO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Bike return",
    "prepare": "Have the bike and its frame number nearby",
    "steps": [
      { "key": "frame", "kind": "scan_code", "reference": "frame", "referenceRequired": true,
        "title": "Point your camera at the frame number sticker",
        "instruction": "It is under the bottom bracket. Fit its barcode inside the frame and hold still." },
      { "key": "bike", "kind": "show_item", "reference": "item" },
      { "key": "sides", "kind": "photos", "title": "Show both sides of the bike",
        "views": ["Show the left side", "Now show the right side"] },
      { "key": "move_around", "kind": "move_around" },
      { "key": "light", "kind": "light_response", "reference": "item" }
    ]
  }'

The answer is the template with its id (tpl_...), version: 1 and capabilities: whether it can issue Verified, the references it reads and what each step checks. Read capabilities before you build on a template. The dashboard shows the same on the template's page:

The Bike return template's page in the Verilo dashboard: it can issue Verified, its references, and its 5 steps with the words on the phone and what each is checked against.

The Bike return template on the dashboard: it can issue Verified, the references it reads, and each step with the words on the phone and what it is checked against.

Fields

  • name: up to 80 characters.
  • description: for your team, up to 500 characters.
  • prepare: what to have ready, shown to the person before the steps, up to 120 characters.
  • order: server_random (the default) runs the first step first and draws the order of the rest for each Session, so nobody can prepare a recording for it. as_listed runs them in your order.
  • steps: 1 to 10 steps. For each: kind, a key, the phone's title and instruction (each kind has its own words when you leave them out), and optionally reference, referenceRequired, allowMissing (scan_code) and views (photos).

Use it

cURL
curl https://api.verilo.app/v1/verifications \
  -H "Authorization: Bearer $VERILO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "template": "tpl_...", "reference": "BIKE-4410",
        "references": { "frame": ["WTU123X4567"], "item": "https://cdn.example.com/bikes/gravel-54.jpg" } }'

Leaving out frame answers reference_missing, because the step requires it. A reference name no step uses answers parameter_invalid, so a typo never silently skips a check.

Words on the phone

The person sees each step's title as the heading and its instruction below it, with live hints while the camera works ("Hold the code steady", "Move closer"). Write titles as what to point the camera at, and instructions as what to do: "Point your camera at the frame number sticker", "It is under the bottom bracket." The pages around the steps use neutral words, with your account's name and the Verification's subject.name. They never mention a claim, a shipping label or damage unless your steps do.

Bike return on the person's phone: the first page ("A quick camera check") with Start, then 5 steps: 1, "Point your camera at the frame number sticker"; 2, "Point your camera at the whole item"; 3, "Show both sides of the bike"; 4, "Keep the camera on the item and move around it"; 5, "Point your camera at the item and hold still".

The Bike return template on the rider's phone: the first page with what to have ready, then each step with the template's own words, or the kind's where the template gives none.

Change it

POST /v1/templates/{id} with the fields to change makes a new version. Verifications already made keep the version they were made with, so a change never alters a Verification under way, and each Verification's template.version says which steps it ran. DELETE /v1/templates/{id} archives it: no new Verifications can use it, and those already made are unaffected.

In the dashboard

Under Developers → Templates you can read every template's steps and capabilities, copy a built-in template to start your own, build one step by step and save new versions.

The Templates page under Developers in the Verilo dashboard: one template of your own, Bike return, version 2, and the 5 built-in templates (Damage claim, Rental return condition, Warranty claim with serial capture, Possession and condition for resale listings, Condition at delivery or return), each with its steps and a line saying it can issue Verified because it has a light-response step.

Developers → Templates: your own templates above the built-in ones, each with its steps and whether it can issue Verified. New template opens the builder.

The builder has one row per step: its kind, its key, the reference it is checked against, the title and instruction on the phone, and photo views. Copy to my templates opens it filled with a built-in template's steps. It applies the same rules as the API and names the field when a rule is broken, such as steps[2].reference.

The New template page in the Verilo dashboard: the name Bike return, the order (first step first, the rest drawn by the server), what to have ready, and five steps, each with its kind, key, the reference it is checked against, the title and instruction on the phone and photo views: frame (Read a code), bike (Show the item), sides (Photos), move_around (Move around), light (Light response). Add steps and Create template below.

The step builder with the Bike return template. Blank rows are ignored; Add steps opens more, up to ten.

Without a light step

A template without a light_response step is accepted. Nothing in it rules out a screen or a printed picture, so its capabilities.canIssueVerified is false and its best Result is Needs Review, with the reason in the Explanation. Use one where a person reviews every Result anyway, or where the phone's light cannot be used.

Test and live

Templates belong to a mode, like every other object: a template made with a test key exists in test mode only. Make it again with a live key when you go live, or keep the definition in your code and send it to both.