SDK reference · Node SDK

prov.attest.attestations.create

prov.attest.attestations.create in Node SDK.

Signature

prov.attest.attestations.create(params: AttestParams): Promise<AttestResult>

Parameters

paramsAttestParamsRequired

Request fields

Idempotency-Keystringheader
Retry a create safely: the same key + request returns the stored response (24 h, per caller).
bundleobjectRequired
The signed attestation bundle.
Show child attributes
schemastringRequired
The bundle schema's URL.
attestation_idstringRequired
The attestation's ID.
device_idstringRequired
The capture or approving device's ID.
claim_idstringRequired
The claim, or case in another vertical, the asset belongs to.
capture_typestringRequired
image or video.
capture_timestampstringRequired
When the device captured it.
sensor_hashstringRequired
SHA-256 of the image bytes, or the video's chain root.
signaturestringRequired
The base64url signature from the passkey assertion.
signature_algorithmstringRequired
ECDSA-P256-SHA256.
schema_versionstringRequired
The bundle schema version.
image_base64stringRequired
The image bytes, base64-encoded.
case_typestringRequired
The vertical: insurance_claim (the default), inspection, escrow, proof_of_work, presence or custom.

Returns

Promise<AttestResult> The attestation, with its risk score.

HTTP operation

POST /v1/attest/attestations: Attest a capture

Errors

Example

const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/attest/attestations`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "bundle": {
      "schema": "https://provenanceauth.com/claims/v2",
      "attestation_id": "att_3B1WY2X38T9XDSRZHA9NQRP30Y",
      "device_id": "dev_00000000000000000000000000000001",
      "claim_id": "CLM-2026-0412",
      "capture_type": "image",
      "capture_timestamp": "2026-10-24T13:30:00.000Z",
      "sensor_hash": "03cbcb52cf9c3fd0e9f54d96c03aeac08c36de58c0dbd147ffc1a9b1aea6d522",
      "signature": "MEUCIQDx5n0q4sSPVd3a2Wbl0L8kQ0YwGg",
      "signature_algorithm": "ECDSA-P256-SHA256",
      "schema_version": "2.0.0"
    },
    "image_base64": "/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAP",
    "case_type": "insurance_claim"
  }),
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.