PgBeam Docs
Agents

Verify the tamper-evident audit chain

GET
/v1/projects/{project_id}/audit-logs/verify

Recomputes the project's audit hash chain over an optional time range and reports whether it is intact. Each audit entry is linked to its predecessor with a SHA-256 hash, so editing or deleting any row breaks the chain. On a break, the response reports the first sequence number where a tampered or deleted entry was detected. Requires the same audit:read permission as the list and export endpoints.

Authorization

AuthorizationBearer <token>

JWT issued by Better Auth. Verified via JWKS.

In: header

Path Parameters

project_id*string

Unique project identifier (prefixed, e.g. prj_xxx).

Match^[a-zA-Z0-9_.-]+$

Query Parameters

start?string

Return entries at or after this timestamp (inclusive lower bound).

Formatdate-time
end?string

Return entries strictly older than this timestamp (cursor / upper bound).

Formatdate-time

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/projects/string/audit-logs/verify"
{  "ok": true,  "verified_count": 0,  "unchained_count": 0,  "chain_start_seq": 0,  "chain_end_seq": 0,  "first_broken_seq": 0,  "failure_reason": "string",  "verified_at": "2019-08-24T14:15:22Z"}
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}