SDK reference · Python SDK
prov.attest.attestations.create
prov.attest.attestations.create in Python SDK.
Signature
prov.attest.attestations.create(**body: Any = …) -> AnyParameters
**bodyAny
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_typestringRequiredimageorvideo.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_algorithmstringRequiredECDSA-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,presenceorcustom.
Returns
Any The attestation, with its risk score.
HTTP operation
POST /v1/attest/attestations: Attest a capture
Errors
- authentication_required
- detector_not_configured
- idempotency_key_reused
- insufficient_scope
- invalid_json
- media_too_large
- parameter_invalid
- parameter_missing
- plan_required
- rate_limit_exceeded
- resource_missing
- screening_provider_error
- usage_limit_reached
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();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/attest/attestations", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}, json={
"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()