Skip to Content

Receipts API

Endpoints for listing, fetching, and verifying receipts. Receipts are append-only signed audit records — see Receipts concept for details.


List receipts

GET/v1/receipts

Returns a paginated list of receipts for the authenticated organization.

Query parameters

ParameterTypeDescription
decisionstringFilter by decision: allow, deny, pending_approval, error
risk_levelstringFilter by risk: low, medium, high
agent_idstringFilter by agent ID
fromstringStart of time range (ISO 8601)
tostringEnd of time range (ISO 8601)
searchstringSearch across action, resource, and receipt ID

Example request

curl -X GET "https://your-relynt-instance/v1/receipts?decision=allow&agent_id=agent_abc123" \ -H "Authorization: Bearer <token>"

Example response

{ "receipts": [ { "receipt_id": "rec_abc123", "created_at": "2025-01-15T10:30:00Z", "agent_id": "agent_abc123", "instance_id": "run-001", "action": "update_deal", "resource": "crm:deal:42", "decision": "allow", "risk_level": "low", "policy_version": "v3" } ] }

Get receipt

GET/v1/receipts/:id

Returns the full receipt object including hashes and signature.

Path parameters

ParameterDescription
idThe receipt ID (e.g., rec_abc123)

Example request

curl -X GET "https://your-relynt-instance/v1/receipts/rec_abc123" \ -H "Authorization: Bearer <token>"

Example response

{ "receipt_id": "rec_abc123", "created_at": "2025-01-15T10:30:00Z", "organization_id": "org_xyz", "agent_id": "agent_abc123", "instance_id": "run-001", "action": "update_deal", "resource": "crm:deal:42", "policy_version": "v3", "decision": "allow", "risk_level": "low", "request_hash": "sha256:a1b2c3d4...", "response_hash": "sha256:e5f6g7h8...", "signature": "hmac-sha256:i9j0k1l2...", "idempotency_key": "550e8400-e29b-41d4-a716-446655440000" }

Verify receipt

GET/v1/receipts/:id/verify

Verifies the integrity of a receipt by recomputing its HMAC-SHA256 signature and comparing it to the stored value.

Path parameters

ParameterDescription
idThe receipt ID to verify

Example request

curl -X GET "https://your-relynt-instance/v1/receipts/rec_abc123/verify" \ -H "Authorization: Bearer <token>"

Response

{ "valid": true }
FieldTypeDescription
validbooleantrue if the receipt signature matches, false if tampered

Verification recomputes the HMAC-SHA256 signature server-side using the signing key. A valid: true response confirms the receipt has not been modified since creation.


Receipt fields reference

FieldTypeDescription
receipt_idstringUnique identifier
created_atstringISO 8601 timestamp
organization_idstringOwning organization
agent_idstringAgent that made the request
instance_idstringAgent run identifier
actionstringOperation string
resourcestringTarget resource identifier
policy_versionstringPolicy version evaluated
decisionstringallow, deny, pending_approval, or error
risk_levelstringlow, medium, or high
request_hashstringSHA-256 of canonical request body
response_hashstringSHA-256 of connector response (when available)
signaturestringHMAC-SHA256 for tamper detection
approval_idstringLinks to approval record (when applicable)
idempotency_keystringClient-provided idempotency key
approverstringIdentity of approver (when applicable)
Last updated on