View as Markdown

Attest · Guide

Run inspections and escrow

Use Attest beyond insurance by tagging each capture with a case_type. The same capture, attest and verify flow then answers in your vertical's words, and your risk policy can require different signals per vertical.

case_typeUse it for
insurance_claimInsurance claims (the default when you leave it out)
inspectionField and property inspections
escrowItem photos in a marketplace sale
proof_of_workProof a job was done
presenceProof someone was at a place
customYour own vertical (Enterprise)

Before you begin: export the full-access sandbox key.

export PROVENANCE_API=https://sandbox-api.provenanceauth.com
export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe

1. Tag each capture

Send case_type with the signed bundle the capture SDK produced to POST /v1/attest/attestations. This uses a bundle from your own capture app:

curl $PROVENANCE_API/v1/attest/attestations \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{ \"bundle\": $(cat bundle.json), \"case_type\": \"inspection\" }"
{
  "id": "att_3B1WY2X38T9XDSRZHA9NQRP30Y",
  "object": "attestation",
  "risk_score": 0,
  "status": "verified"
}

The claim_id field holds your case ID in every vertical.

2. Read results in your vertical's words

Explanations use the vertical's noun. The sandbox seeds an inspection, VER-SANDBOX-INSPECTION:

curl $PROVENANCE_API/v1/attest/claims/VER-SANDBOX-INSPECTION/explanation \
  -H "Authorization: Bearer $PROVENANCE_KEY"
{
  "object": "claim_explanation",
  "claim_id": "VER-SANDBOX-INSPECTION",
  "template_version": "2026-07-05.1",
  "locale": "en",
  "overall_status": "verified",
  "summary": "All provenance checks passed for this inspection — no issues were found.",
  "factors": [],
  "disposition": null
}

3. Require signals per vertical

case_type is a fact in your account's risk policy, so a vertical's rules are configuration. This rule says inspections must carry a biometric; an inspection without one then gets the advisory factor carrier_policy_biometric_missing. Try it first against sample facts with POST /v1/attest/risk_policies/simulate. Simulate reads case_type the same way attest does: a missing or unrecognized value counts as insurance_claim.

The risk policy routes are Attest routes, so the key needs the attest scope, which also lets it save the policy. Make an Attest key on the account with its All products key (a key limited to some products can't make keys), or use an All products key throughout:

curl -s -X POST "$PROVENANCE_API/v1/account/keys" \
  -H "Authorization: Bearer prv_test_all_A1lP7vQ3bW9mK2sYd6cFjLh8gAe4tR5" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Risk policy", "products": ["attest"] }' | tee risk-key.json
export RISK_KEY=$(jq -r .api_key risk-key.json)
curl "$PROVENANCE_API/v1/attest/risk_policies/simulate" \
  -H "Authorization: Bearer $RISK_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document": { "rules": [{ "id": "inspections-need-biometric", "when": [{ "fact": "case_type", "op": "eq", "value": "inspection" }], "require": { "signal": "biometric" } }] },
    "facts": { "case_type": "inspection", "gps_present": true, "biometric_present": false, "attested": true }
  }'

The response, trimmed:

{
  "object": "policy_simulation",
  "domain": "claims_risk",
  "factors": [{ "factor": "carrier_policy_biometric_missing" }]
}

The same facts with "case_type": "insurance_claim" return no carrier factor. When the result is what you expect, save the rule with PUT /v1/attest/risk_policies:

curl -X PUT "$PROVENANCE_API/v1/attest/risk_policies" \
  -H "Authorization: Bearer $RISK_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "note": "inspections need a biometric",
    "document": { "rules": [{ "id": "inspections-need-biometric", "when": [{ "fact": "case_type", "op": "eq", "value": "inspection" }], "require": { "signal": "biometric" } }] }
  }'
{
  "object": "policy_version",
  "domain": "claims_risk",
  "version": 1,
  "active": true,
  "note": "inspections need a biometric"
}

The rule applies to attestations from keys on that account. To go back to the default, send DELETE /v1/attest/risk_policies; see policies.

curl -s -X DELETE "$PROVENANCE_API/v1/attest/risk_policies" \
  -H "Authorization: Bearer $RISK_KEY"
{ "object": "policy", "domain": "claims_risk", "is_default": true }

Field inspections

Prove each inspection photo or video was captured on site, on a known device, at the stated time. The inspector captures with the capture SDK, and your backend attests each signed bundle with case_type: "inspection" and the inspection's ID as claim_id. Then read the inspection's provenance; the sandbox seeds VER-SANDBOX-INSPECTION:

curl $PROVENANCE_API/v1/attest/claims/VER-SANDBOX-INSPECTION/provenance \
  -H "Authorization: Bearer $PROVENANCE_KEY"

The response, trimmed to each asset's verdict:

{
  "id": "VER-SANDBOX-INSPECTION",
  "object": "claim",
  "assets": [
    { "id": "att_00000000000000000000000000000020", "object": "verification_result", "status": "verified", "risk_score": 0, "risk_factors": [] },
    { "id": "att_00000000000000000000000000000021", "object": "verification_result", "status": "verified", "risk_score": 0, "risk_factors": [] }
  ],
  "overall_status": "verified",
  "overall_risk_score": 0
}

Each asset also carries its device, certificate check, location and chain of custody.

To make every inspection carry GPS, add a rule keyed on case_type as in step 3. An inspection without GPS then gets an advisory carrier_policy_gps_missing factor. With a loss_location sent at attest, a capture far from the site adds geofence_mismatch. Enroll inspectors' devices in the device registry: a capture from an unknown device scores device_not_enrolled.

Marketplace escrow

Release escrowed funds only when the seller's item photos and video verify as unchanged captures from a real device. The seller captures the item with the capture SDK, and your backend attests each signed bundle with case_type: "escrow" and the listing or order ID as claim_id. Before release, read the case's provenance and release funds only when overall_status is verified. The sandbox's seeded CLM-SANDBOX-FRAUD shows what a changed photo looks like:

Read the case's provenance and release funds only when overall_status is verified. The sandbox's seeded CLM-SANDBOX-FRAUD shows what a changed photo looks like:

curl $PROVENANCE_API/v1/attest/claims/CLM-SANDBOX-FRAUD/provenance \
  -H "Authorization: Bearer $PROVENANCE_KEY"

The response, trimmed to the verdict:

{
  "id": "CLM-SANDBOX-FRAUD",
  "object": "claim",
  "overall_status": "failed",
  "overall_risk_score": 100
}

A failed status, such as an edited photo, a stripped screenshot or an unknown device, is your signal to hold the funds and ask for a new capture.

To tie the seller to the moment of capture, require a biometric for case_type: "escrow" with a rule as in step 3. For listing photos that were never attested, screening gives an advisory score; ask for an attested re-capture before funds move. A partial status means a soft signal such as missing GPS: decide per your policy, or require the signal.

Errors you might see

SymptomCauseFix
The explanation says "claim" and your vertical's rules don't applycase_type is missing or isn't a listed type, so it counts as insurance_claimSend a listed type, or custom.
402 plan_requiredcustom is EnterpriseSee plans and usage.
404 resource_missingThe case belongs to another carrier keyUse the key the captures were attested with.

See also