View as Markdown

Attest · API reference

Capture sessions

Live video capture with a hash chain seeded by the server.

Related guide: Video attestation

The capture session object

Attributes

idstringRequired
Unique identifier for the object.
objectenumRequired
The type of object. One of capture_session.
statusstringRequired
The object's current status.
session_noncestringRequired
The server's nonce that seeds the chunk hash chain.
expires_atstringRequired
When it expires.

The capture session object

{
  "id": "cses_5F7EZSMK638H49GYJHXEPPRHPX",
  "object": "capture_session",
  "status": "open",
  "session_nonce": "ba1f8c8ba8c45d6ef7c20d57fbad00b6cf27d6c31f33c680aa0915698385ba79",
  "expires_at": "2026-11-07T19:31:47.030Z"
}

Open a capture session

POST/v1/attest/capture_sessions

Opens a live video capture session. The server's session_nonce seeds the chunk hash chain, so a recording made earlier can't pass as live.

Parameters

Idempotency-Keystringheader
Retry a create safely: the same key + request returns the stored response (24 h, per caller).
device_idstringRequired
The capture or approving device's ID.
claim_idstringRequired
The claim, or case in another vertical, the asset belongs to.
chunk_duration_msintegerRequired
Each chunk's length, in milliseconds.

Returns

The session, with its ID and nonce. See the capture session object.

Errors

export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe
curl -X POST "$PROVENANCE_API/v1/attest/capture_sessions" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "device_id": "dev_00000000000000000000000000000001",
    "claim_id": "CLM-DOCS-VIDEO",
    "chunk_duration_ms": 2000
  }'

Response 200

{
  "id": "cses_5F7EZSMK638H49GYJHXEPPRHPX",
  "object": "capture_session",
  "status": "open",
  "session_nonce": "ba1f8c8ba8c45d6ef7c20d57fbad00b6cf27d6c31f33c680aa0915698385ba79",
  "expires_at": "2026-11-07T19:31:47.030Z"
}

Add a chunk hash

POST/v1/attest/capture_sessions/{id}/chunks

Adds one chunk's hash to a live session, in order. The server records when each chunk arrived, for the timing checks at finalize.

Parameters

Idempotency-Keystringheader
Retry a create safely: the same key + request returns the stored response (24 h, per caller).
idstringpathRequired
The session's ID.
indexintegerRequired
The position, from 0.
chunk_hashstringRequired
The chunk's chained hash.
captured_atstringRequired
When the device captured the chunk.

Returns

The session with the chunk added.

Errors

export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe
curl -s -X POST "$PROVENANCE_API/v1/attest/capture_sessions" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "device_id": "dev_00000000000000000000000000000001",
    "claim_id": "CLM-DOCS-VIDEO",
    "chunk_duration_ms": 2000
  }' > step.json
export SESSION_ID=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/attest/capture_sessions/$SESSION_ID/chunks" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "index": 0,
    "chunk_hash": "2110a233677a28c9cd6d66ac954ce831e70587e1940cf53e1a66f36683efad68",
    "captured_at": "2026-10-24T13:30:00.000Z"
  }'

Response 200

{
  "object": "capture_chunk",
  "session_id": "cses_2ACVSEKTKG8YM9N2BHPZY4PQS0",
  "index": 0,
  "chunk_count": 1
}

Finalize a capture session

POST/v1/attest/capture_sessions/{id}/finalize

Closes a live session with the signed video bundle and verifies it: the nonce, the chunk chain and the arrival timing.

Parameters

Idempotency-Keystringheader
Retry a create safely: the same key + request returns the stored response (24 h, per caller).
idstringpathRequired
The session's ID.
bundleobjectRequired
The signed attestation bundle.
Show child attributes
schemastringRequired
The bundle schema's URL.
capture_typestringRequired
image or video.
session_noncestringRequired
The server's nonce that seeds the chunk hash chain.
signaturestringRequired
The base64url signature from the passkey assertion.

Returns

The verification result for the finished video.

Errors

export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe
curl -X POST "$PROVENANCE_API/v1/attest/capture_sessions/cs_01M5Q1VJHMGX8E4RVWQ6Y2B9TN/finalize" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "bundle": {
      "schema": "https://provenanceauth.com/claims/v2",
      "capture_type": "video",
      "session_nonce": "9f2b1c4d6e8a0b2c4d6e8f0a1b3c5d7e9f1a3b5c7d9e1f3a5b7c9d1e3f5a7b9c",
      "signature": "MEUCIQDx5n0q4sSPVd3a2Wbl0L8kQ0YwGg"
    }
  }'

Response 200

{
  "id": "cses_3X7EF22Q2A9Y7BDMGTKJ73YPVG",
  "object": "verification_result",
  "claim_id": "CLM-2026-10421",
  "status": "verified",
  "risk_score": 0,
  "risk_factors": [],
  "chain": [
    {
      "event_type": "capture",
      "timestamp": "2026-10-24T22:31:40.112Z",
      "actor": "device:dev_00000000000000000000000000000001",
      "summary": "Captured video attestation (12 chunks)"
    }
  ],
  "device_info": {
    "device_id": "dev_00000000000000000000000000000001",
    "enrolled": true,
    "cert_valid": true,
    "cert_expires": "2028-10-23T22:26:42.000Z"
  },
  "capture_type": "video",
  "liveness_checked": true,
  "synthetic_media_score": null,
  "synthetic_media_factors": null,
  "verified_at": "2026-10-24T22:31:52.904Z",
  "sensor_hash": "0b7e4c2a9f1d6e38b5a2c7f4d1e9b3a06c8f2d5e7b1a4c9f3e6d0b8a2c5f7e1d"
}

Was this page helpful? Send us feedback

LLM? Read llms.txt.