API reference · Receipts

Verify events

POST/v1/receipts/verify

Recompute the hashes of events you hold and check them against the record, plus signed provenance and evidence reports.

On this page

Auth. None. Without a token the call is served as Free (the Free delay and request budget, shared per IP); send Authorization: Bearer lb_… for your plan's.

Limits. Counts against your plan's API requests (60, 600 or 3,000 a minute on Free, Builder and Standard).

Parameters

Body

NameTypeRequiredDescription
eventsarray of objectnoEvents as you received them. Up to 500 items.
reportsarray of objectnoSigned provenance reports or evidence packs. Up to 50 items.

Request

Terminal
curl -X POST "https://api.langbot.ai/v1/receipts/verify" \
  -H "Content-Type: application/json" \
  -d '{"events": [{"id": "evt_01K7Q0000000000000000000A2", "hash": "5d0e05c3…", "…": "…"}]}'

Response

201 Created

JSON
{
  "results": [
    { "id": "evt_01K7Q0000000000000000000A2", "status": "match", "computed_hash": "5d0e05c3…", "stored_hash": "5d0e05c3…", "chain_ok": true, "chain_seq": 2, "checkpoint": { "chain_seq": 2, "key_id": "56475aa75463474c", "signature": "cEf385IN…" } }
  ]
}

status is match, mismatch or unknown. chain_ok says whether the stored prev_hash equals the stored hash one position earlier (null for the first event). No plan delay applies: you already hold the events.

Errors

StatuscodeWhen
401token_invalidA token was sent and not recognised. Send a valid one, or none to call anonymously.
422validation_errorA parameter failed validation; detail[].loc names it.
429rate_limitedOver your request budget; wait Retry-After seconds.

Every error body is {"detail": …, "code": "…"}; branch on code. All codes: Errors.