Attest · Guide
Work cases and appeals
Use cases to move each claim from triage to a decision with an audit trail, and appeal links to let a policyholder answer a decision without an account.
Every claim has a case with a status, an assignee and an append-only history. A case is created the first time you view the queue or the claim, so there's nothing to backfill. Cases are scoped to your carrier key.
Before you begin: export the full-access sandbox key. Reading cases needs the attest scope; changing them needs escalate.
export PROVENANCE_API=https://sandbox-api.provenanceauth.com
export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe
1. Read the queue
GET / lists cases highest risk first. Filter with status or assignee, or sort by age. Here, the escalated cases:
curl "$PROVENANCE_API/v1/attest/cases?status=escalated&limit=1" \
-H "Authorization: Bearer $PROVENANCE_KEY"
import { Provenance } from "@provenanceauth/sdk";
const prov = new Provenance({ apiKey: process.env.PROVENANCE_KEY!, baseUrl: process.env.PROVENANCE_API });
const queue = await prov.attest.cases.list({ status: "escalated", limit: 1 });
import os
import httpx
api, headers = os.environ["PROVENANCE_API"], {"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}
queue = httpx.get(f"{api}/v1/attest/cases", params={"status": "escalated", "limit": 1}, headers=headers).json()
{
"object": "list",
"data": [
{
"id": "01M5Q06YQY97SYKM316M08X099",
"object": "case",
"claim_id": "CLM-SANDBOX-FRAUD",
"status": "escalated",
"assignee_account_id": null,
"risk_snapshot": 100,
"overall_risk_score": 100,
"asset_count": 2,
"submitted_at": "2026-10-24T13:04:44.283Z",
"opened_at": "2026-10-24T13:04:44.255Z",
"updated_at": "2026-10-24T13:04:44.255Z"
}
]
}
2. Start a review
Cases are addressed by claim ID. Move one to in_review with POST /:
curl $PROVENANCE_API/v1/attest/cases/CLM-SANDBOX-PARTIAL/transition \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{ "to_status": "in_review", "note": "Checking the two web uploads." }'
await prov.attest.cases.transition("CLM-SANDBOX-PARTIAL", { toStatus: "in_review", note: "Checking the two web uploads." });
httpx.post(f"{api}/v1/attest/cases/CLM-SANDBOX-PARTIAL/transition", headers=headers,
json={"to_status": "in_review", "note": "Checking the two web uploads."})
The response, trimmed:
{
"object": "case",
"claim_id": "CLM-SANDBOX-PARTIAL",
"status": "in_review",
"assignee_account_id": null
}
Assign a case with POST /, and add a note to its history with POST /.
3. Decide the case
Approving, denying or escalating a case needs a reason code, the record of why:
reason_code | Use it when |
|---|---|
provenance_ | The media verified and the claim stands. |
risk_ | You accept the claim despite open signals. |
signature_ | The media was changed after capture. |
suspected_ | The evidence points to fraud. |
insufficient_ | The policyholder couldn't support the claim. |
policyholder_ | The claim was withdrawn. |
other | Anything else; it requires a note. |
curl $PROVENANCE_API/v1/attest/cases/CLM-SANDBOX-PARTIAL/transition \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{ "to_status": "denied", "reason_code": "insufficient_evidence", "note": "The policyholder could not provide the originals." }'
await prov.attest.cases.transition("CLM-SANDBOX-PARTIAL", { toStatus: "denied", reasonCode: "insufficient_evidence", note: "The policyholder could not provide the originals." });
httpx.post(f"{api}/v1/attest/cases/CLM-SANDBOX-PARTIAL/transition", headers=headers, json={
"to_status": "denied", "reason_code": "insufficient_evidence", "note": "The policyholder could not provide the originals.",
})
The response, trimmed:
{
"object": "case",
"claim_id": "CLM-SANDBOX-PARTIAL",
"status": "denied"
}
Cases move along a fixed graph: new and in_review lead to a decision; approved and denied can be reopened; escalated can be approved, denied or reopened. An illegal move is a 400. Every move is a row in the case's history and fires the attest.case.status_changed webhook.
4. Send the policyholder an appeal link
When a claim is denied, as CLM-SANDBOX-PARTIAL was in step 3, POST / mints a signed link the policyholder opens without logging in. It is valid for seven days and files once:
curl -s -X POST $PROVENANCE_API/v1/attest/claims/CLM-SANDBOX-PARTIAL/appeal_links \
-H "Authorization: Bearer $PROVENANCE_KEY" | tee appeal-link.json
const link = await prov.attest.claims.appealLink("CLM-SANDBOX-PARTIAL");
from provenanceauth import Provenance
prov = Provenance(os.environ["PROVENANCE_KEY"], base_url=api)
link = prov.attest.claims.appeal_link("CLM-SANDBOX-PARTIAL")
{
"object": "appeal_link",
"claim_id": "CLM-SANDBOX-PARTIAL",
"appeal_url": "https://app.provenanceauth.com/appeal/eyJjbGFpbV9pZCI6IkNMTS1TQU5EQk9YLUZSQVVEIn0~RPB-oMWuD-8fCpnx2vb40xRohn8vmcx7PyVfRtfBVlI",
"token": "eyJjbGFpbV9pZCI6IkNMTS1TQU5EQk9YLUZSQVVEIn0~RPB-oMWuD-8fCpnx2vb40xRohn8vmcx7PyVfRtfBVlI",
"expires_at": "2026-10-31T13:24:30.000Z"
}
The appeal page shows the claim's explanation.
5. Receive the appeal
The policyholder's page files the appeal with POST /, which needs only the token:
export APPEAL_TOKEN=$(jq -r .token appeal-link.json)
curl $PROVENANCE_API/v1/attest/appeals \
-H "Content-Type: application/json" \
-d '{ "token": "'"$APPEAL_TOKEN"'", "statement": "The damage is real. I can send the original photos." }'
const appeal = await (await fetch(`${process.env.PROVENANCE_API}/v1/attest/appeals`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ token: link.token, statement: "The damage is real. I can send the original photos." }),
})).json();
appeal = httpx.post(f"{api}/v1/attest/appeals", json={"token": link["token"], "statement": "The damage is real. I can send the original photos."}).json()
{
"id": "apl_01M5Q1BNYSG7C2D1RVFNMPY928",
"object": "appeal",
"claim_id": "CLM-SANDBOX-PARTIAL",
"status": "filed",
"case_status": "reopened",
"created_at": "2026-10-24T13:24:47.705Z"
}
Filing reopens the case, so it returns to the queue for a person to decide. Provenance doesn't decide appeals.
Appeals in your portal
To take the appeal inside your policyholder portal instead of on the hosted link, render <provenance-appeal>. Mint an appeal embed token for the claim with your verify key (the same key the explanation uses):
<!-- your backend: POST /v1/embed/tokens { "widget": "appeal", "object_id": "CLM-20481" } -->
<provenance-appeal base-url="…" publishable-key="prv_pub_…" embed-token="emb_…"></provenance-appeal>
The component shows the plain-language explanation from the same fixed, versioned templates as GET /, and records the same explanation_rendered event on the case.
The policyholder writes a reason (up to 2,000 characters), can add up to 3 photos or PDFs (5 MB each), and sends it. The appeal is the same row and the same case reopen as the hosted link, with surface: "embed"; the component fires pv:appealed { appeal_id }. While that appeal is open, the component shows its reference instead of a second form.
Read the appeals on a claim, from either surface, with GET /. Each lists its files; download one with GET /. Appeals are free on every plan.
Errors you might see
| Symptom | Cause | Fix |
|---|---|---|
400 parameter_ on to_ | An illegal transition, or a decision without a reason code | Follow the graph in step 3 and send reason_. |
409 appeal_ | The link was already used | Send a new appeal link. |
401 appeal_ | The link expired or was altered | Send a new appeal link. |
403 insufficient_ | Changing a case needs the escalate scope | Use a key with escalate. |