# Appeals

Signed links that let a policyholder appeal without a login.

Related guide: [Cases and appeals](https://provenanceauth.com/docs/attest/guides/cases-and-appeals.md)

## Endpoints

- `POST /v1/attest/claims/{id}/appeal_links`: [Create an appeal link](#post-v1-attest-claims-id-appeal-links)
- `GET /v1/attest/claims/{id}/appeals/{appeal_id}/files/{file_id}`: [Download an appeal file](#get-v1-attest-claims-id-appeals-appeal-id-files-file-id)
- `GET /v1/attest/appeals/context`: [Read an appeal link](#get-v1-attest-appeals-context)
- `GET /v1/attest/claims/{id}/appeals`: [List a claim's appeals](#get-v1-attest-claims-id-appeals)
- `POST /v1/attest/appeals`: [File an appeal](#post-v1-attest-appeals)

## The claim appeal object

### Attributes

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | no | The appeal's ID. |
| `object` | enum | no | The type of object. One of `appeal`. |
| `claim_id` | string | no | The claim. |
| `reference` | string | no | The policyholder's short reference (`APL-7Q2K`). |
| `status` | enum | no | The appeal's status. One of `filed`. |
| `surface` | enum | no | Where it was filed: the hosted link or `<provenance-appeal>`. One of `link`, `embed`. |
| `statement` | string | no | The policyholder's reason. |
| `new_attestation_ids` | array of strings | no | Attested media named with it (the hosted link). |
| `files` | array of objects | no | Files sent with it. |
| `files.id` | string | no | The file's ID (`apf_…`). |
| `files.object` | enum | no | The type of object. One of `appeal_file`. |
| `files.name` | string | no | The file's name. |
| `files.content_type` | enum | no | The type, from its bytes. One of `image/jpeg`, `image/png`, `image/webp`, `application/pdf`. |
| `files.size_bytes` | integer | no | The size. |
| `files.sha256` | string | no | SHA-256 of the bytes (on the carrier's list). |
| `created_at` | timestamp | no | When it was filed. |

### Example

```json
{
  "id": "apl_01M5X8AV9T4R2K8QW6YB3NC5DE",
  "object": "appeal",
  "claim_id": "CLM-20481",
  "reference": "APL-C5DE",
  "status": "filed",
  "surface": "embed",
  "statement": "The photos were taken the day of the storm on my old phone. Its clock was set to the wrong time zone.",
  "new_attestation_ids": [],
  "files": [
    {
      "id": "apf_01M5X8AV7P2K9QW3RT6YB4NC1D",
      "object": "appeal_file",
      "name": "roof-close-up.jpg",
      "content_type": "image/jpeg",
      "size_bytes": 2516582,
      "sha256": "6f1ed002ab5595859014ebf0951522d9a3e2b9bb4f1e0b1a4bfa7f2a6c1d9e0b"
    }
  ],
  "created_at": "2026-10-26T14:31:02.000Z"
}
```

## Create an appeal link

`POST /v1/attest/claims/{id}/appeal_links`

Returns a signed link for the policyholder to read the claim's explanation and file one appeal, without a login. It lasts seven days.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Idempotency-Key` | header | string | no | Retry a create safely: the same key + request returns the stored response (24 h, per caller). |
| `id` | path | string | yes | The claim, or case in another vertical, the asset belongs to. |

### Returns

The appeal link and when it expires.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe
curl -X POST "$PROVENANCE_API/v1/attest/claims/CLM-SANDBOX-FRAUD/appeal_links" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/attest/claims/CLM-SANDBOX-FRAUD/appeal_links`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}` },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/attest/claims/CLM-SANDBOX-FRAUD/appeal_links", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}).json()
```

### Response 200

```json
{
  "object": "appeal_link",
  "claim_id": "CLM-SANDBOX-FRAUD",
  "appeal_url": "http://localhost:5173/appeal/eyJjbGFpbV9pZCI6IkNMTS1TQU5EQk9YLUZSQVVEIiwiY2Fycmllcl9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDBjMCIsImVudmlyb25tZW50Ijoic2FuZGJveCIsIm5vbmNlIjoiZjlza2dlcWVvYktWSkhpdyIsImV4cCI6MTc5NDY4NDEwN30~-Hy5CEoL9lP8C3-L6FK1NeBWBTjVafgJvzmK5sUWmAU",
  "token": "eyJjbGFpbV9pZCI6IkNMTS1TQU5EQk9YLUZSQVVEIiwiY2Fycmllcl9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDBjMCIsImVudmlyb25tZW50Ijoic2FuZGJveCIsIm5vbmNlIjoiZjlza2dlcWVvYktWSkhpdyIsImV4cCI6MTc5NDY4NDEwN30~-Hy5CEoL9lP8C3-L6FK1NeBWBTjVafgJvzmK5sUWmAU",
  "expires_at": "2026-11-14T19:21:47.000Z"
}
```

## Download an appeal file

`GET /v1/attest/claims/{id}/appeals/{appeal_id}/files/{file_id}`

One file a policyholder sent with an appeal, as its bytes (served as an attachment).

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The claim. |
| `appeal_id` | path | string | yes | The appeal. |
| `file_id` | path | string | yes | The file (`apf_…`). |

### Returns

The file.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x
curl "$PROVENANCE_API/v1/attest/claims/CLM-20481/appeals/apl_01M5X8AV9T4R2K8QW6YB3NC5DE/files/apf_01M5X8AV7P2K9QW3RT6YB4NC1D" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/attest/claims/CLM-20481/appeals/apl_01M5X8AV9T4R2K8QW6YB3NC5DE/files/apf_01M5X8AV7P2K9QW3RT6YB4NC1D`, {
  headers: { Authorization: "Bearer prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x" },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.get(f"{api}/v1/attest/claims/CLM-20481/appeals/apl_01M5X8AV9T4R2K8QW6YB3NC5DE/files/apf_01M5X8AV7P2K9QW3RT6YB4NC1D", headers={"Authorization": "Bearer prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x"}).json()
```

## Read an appeal link

`GET /v1/attest/appeals/context`

Returns the claim's explanation for the policyholder's appeal page. The link's token is the only credential.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `token` | query | string | yes | A signed token. Treat it as a secret. |

### Returns

The claim's explanation and whether an appeal was already filed.

### Errors

- [`appeal_token_invalid`](https://provenanceauth.com/docs/platform/errors.md#appeal_token_invalid)
- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)

### Request

**curl**

```bash
curl -s -X POST "$PROVENANCE_API/v1/attest/claims/CLM-SANDBOX-FRAUD/appeal_links" \
  -H "Authorization: Bearer prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe" > step.json
export APPEAL_TOKEN=$(jq -r '.token' step.json)
curl "$PROVENANCE_API/v1/attest/appeals/context?token=$APPEAL_TOKEN"
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/attest/claims/CLM-SANDBOX-FRAUD/appeal_links`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}` },
})).json();
const appealToken = step1.token;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/attest/appeals/context?token=${appealToken}`)).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/attest/claims/CLM-SANDBOX-FRAUD/appeal_links", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}).json()
appeal_token = step1["token"]
data = httpx.get(f"{api}/v1/attest/appeals/context?token={appeal_token}").json()
```

### Response 200

```json
{
  "object": "appeal_context",
  "claim_id": "CLM-SANDBOX-FRAUD",
  "already_filed": false,
  "explanation": {
    "claim_id": "CLM-SANDBOX-FRAUD",
    "template_version": "2026-07-05.1",
    "locale": "en",
    "overall_status": "failed",
    "summary": "This claim raised 5 provenance signals that need review. Each is explained below, with what would resolve it.",
    "factors": [
      {
        "code": "signature_invalid",
        "title": "Signature did not verify",
        "body": "The capture record's digital signature failed to verify, which means the file was altered after it was signed.",
        "resolution_hint": "Submit the original, unedited file exactly as captured."
      },
      {
        "code": "sensor_hash_mismatch",
        "title": "Image doesn't match its record",
        "body": "The image bytes don't match the fingerprint in its signed record — the picture was changed after capture.",
        "resolution_hint": "Submit the original photo without cropping, filtering, or re-saving it."
      },
      {
        "code": "gps_absent",
        "title": "No location data",
        "body": "The capture carries no GPS location, so we can't corroborate where it was taken.",
        "resolution_hint": "Enable location on the capture device and re-take the media."
      },
      {
        "code": "biometric_absent",
        "title": "No biometric confirmation",
        "body": "No biometric (face or fingerprint) was present at capture to tie a person to the moment.",
        "resolution_hint": "Re-capture with biometric confirmation enabled."
      },
      {
        "code": "exif_missing",
        "title": "Stripped photo metadata",
        "body": "A supposedly fresh photo has no EXIF metadata, which is often removed by re-saving or screenshotting.",
        "resolution_hint": "Advisory only — submit the original file straight from the camera."
      }
    ],
    "disposition": {
      "status": "escalated",
      "reason_code": "suspected_fraud",
      "title": "Suspected fraud",
      "body": "The claim was escalated to the special investigations unit based on the provenance signals.",
      "resolution_hint": "You may appeal with a statement and additional attested evidence."
    }
  }
}
```

## List a claim's appeals

`GET /v1/attest/claims/{id}/appeals`

The appeals on a claim, newest first, from the hosted link and from `<provenance-appeal>` (`surface`), with the files a policyholder added (metadata; the bytes are one request away). Needs the `verify` scope.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The claim. |
| `limit` | query | integer | no | Page size, 1–100 (default 20). Outside the range → 400 parameter_invalid. |
| `cursor` | query | string | no | Opaque; pass a response's `next_cursor` back to get the next page. |

### Returns

The appeals.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x
curl "$PROVENANCE_API/v1/attest/claims/CLM-20481/appeals" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/attest/claims/CLM-20481/appeals`, {
  headers: { Authorization: "Bearer prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x" },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.get(f"{api}/v1/attest/claims/CLM-20481/appeals", headers={"Authorization": "Bearer prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x"}).json()
```

### Response 200

```json
{
  "object": "list",
  "data": [
    {
      "id": "apl_01M5X8AV9T4R2K8QW6YB3NC5DE",
      "object": "appeal",
      "claim_id": "CLM-20481",
      "reference": "APL-C5DE",
      "status": "filed",
      "surface": "embed",
      "statement": "The photos were taken the day of the storm on my old phone. Its clock was set to the wrong time zone.",
      "new_attestation_ids": [],
      "files": [
        {
          "id": "apf_01M5X8AV7P2K9QW3RT6YB4NC1D",
          "object": "appeal_file",
          "name": "roof-close-up.jpg",
          "content_type": "image/jpeg",
          "size_bytes": 2516582,
          "sha256": "6f1ed002ab5595859014ebf0951522d9a3e2b9bb4f1e0b1a4bfa7f2a6c1d9e0b"
        }
      ],
      "created_at": "2026-10-26T14:31:02.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

## File an appeal

`POST /v1/attest/appeals`

Files the policyholder's appeal with their statement, which reopens the case for review. Each link files once.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Idempotency-Key` | header | string | no | Retry a create safely: the same key + request returns the stored response (24 h, per caller). |
| `token` | body | string | yes | A signed token. Treat it as a secret. |
| `statement` | body | string | yes | The policyholder's statement. |
| `new_attestation_ids` | body | array of strings | no | New attested captures to add to the claim. |

### Returns

The appeal. The case is reopened.

### Errors

- [`appeal_already_filed`](https://provenanceauth.com/docs/platform/errors.md#appeal_already_filed)
- [`appeal_token_invalid`](https://provenanceauth.com/docs/platform/errors.md#appeal_token_invalid)
- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`invalid_json`](https://provenanceauth.com/docs/platform/errors.md#invalid_json)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`parameter_missing`](https://provenanceauth.com/docs/platform/errors.md#parameter_missing)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)

### Request

**curl**

```bash
curl -s -X POST "$PROVENANCE_API/v1/attest/claims/CLM-SANDBOX-RING-A/appeal_links" \
  -H "Authorization: Bearer prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe" > step.json
export APPEAL_TOKEN=$(jq -r '.token' step.json)
curl -X POST "$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.\"
  }"
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/attest/claims/CLM-SANDBOX-RING-A/appeal_links`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}` },
})).json();
const appealToken = step1.token;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/attest/appeals`, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "token": appealToken,
    "statement": "The damage is real. I can send the original photos."
  }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/attest/claims/CLM-SANDBOX-RING-A/appeal_links", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}).json()
appeal_token = step1["token"]
data = httpx.post(f"{api}/v1/attest/appeals", json={
    "token": appeal_token,
    "statement": "The damage is real. I can send the original photos."
}).json()
```

### Response 200

```json
{
  "id": "apl_01M6VQBD908TYYA65878WZN9NW",
  "object": "appeal",
  "claim_id": "CLM-SANDBOX-RING-A",
  "status": "filed",
  "case_status": "reopened",
  "created_at": "2026-11-07T19:21:47.040Z"
}
```
