{"uid":"cap_UaXFF4vzgJPCDf896MkGD","slug":"datoka-agent-execution-receipt-issuer-e747ef25","name":"Datoka Agent Execution Receipt Issuer","description":"Datoka Agent: one signed execution declaration receipt. Retry with the same event, idempotency key and payment.","url":"https://datoka-agent.bhazarstudio.workers.dev/v1/operations/issue_agent_receipt?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"event":{"type":"object","required":["version","agentId","runId","stepId","tool","outcome","startedAt","completedAt","inputHash","outputHash"],"properties":{"tool":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$","description":"Tool or operation identifier declared by the caller."},"runId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$","description":"Stable identifier for this execution run."},"stepId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$","description":"Stable identifier of the step within the run."},"agentId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$","description":"Identifier of the declaring agent, not an independently verified identity."},"outcome":{"enum":["success","error"],"type":"string","description":"Outcome declared by the caller; Datoka does not observe execution."},"version":{"type":"string","const":"datoka.agent.execution.v1","description":"Declaration format version; preserve this literal."},"inputHash":{"type":"object","required":["algorithm","digest"],"properties":{"digest":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"64 lowercase hexadecimal characters; SHA-256 of exact bytes."},"algorithm":{"type":"string","const":"sha256","description":"Hash algorithm."}},"description":"SHA-256 of the exact input bytes, computed locally. Never send raw input.","additionalProperties":false},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$","description":"Declared start time in UTC, with milliseconds."},"outputHash":{"type":"object","required":["algorithm","digest"],"properties":{"digest":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"64 lowercase hexadecimal characters; SHA-256 of exact bytes."},"algorithm":{"type":"string","const":"sha256","description":"Hash algorithm."}},"description":"SHA-256 of exact output bytes, computed locally. Never send raw output.","additionalProperties":false},"completedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$","description":"Declared completion in UTC with milliseconds, at or after start."}},"description":"Commitment-only declaration of one execution step.","additionalProperties":false},"idempotencyKey":{"type":"string","pattern":"^[\\x21-\\x7e]{16,200}$","description":"Persist this unique key before purchase. Reuse unchanged with the same input and payment authorization after interruption."}}},"responseSchema":{"type":"json","example":{"event":{"tool":"number.add","runId":"demo-run","stepId":"addition-001","agentId":"demo-agent","outcome":"success","version":"datoka.agent.execution.v1","inputHash":{"digest":"206f7b5543e6f2ef39bf334988fd7097b725caeed16588cd9d785480f2f0f8f6","algorithm":"sha256"},"startedAt":"2026-09-29T13:36:18.844Z","outputHash":{"digest":"4403134882233d347dfa35d23b98c42a4442478ce521631ef566d21df77e2a52","algorithm":"sha256"},"completedAt":"2026-09-29T13:36:18.844Z"},"receipt":{"body":{"id":"48fe5c2f-012c-4e52-a6b0-74ca3c487c98","keyId":"test-key-1","issuer":"datoka.agent.test","request":{"chain":"run:5bbe50afe842854e909b091a6be364f4b16f541a8a6c1195e777d1e0f58d6867","scope":"tenant-a","subject":{"digest":"5ad65af6a67c968f55f77ed7b8d6bf4c5c65167ca3c81fc4811ee61e4fdc3559","encoding":"jcs","algorithm":"sha256"},"eventType":"datoka.agent.execution"},"version":"datoka.receipt.v1","issuedAt":"2026-09-29T13:36:19.022Z","previous":null,"sequence":1},"algorithm":"Ed25519","signature":"QFlVdquYWg4FkGtI02U5V6QKLRiKWs-ACsL0k3dsZXIVOOr_gn8C7Mq0XccRbvVEXMt3HnO0Cth0zsHqXYcQBw"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_zXVzy3sLZnQNgccSC5xQh","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Issues a signed, cryptographically-verifiable execution receipt for a single AI agent step/tool invocation, recording its outcome and input/output hashes.","exampleAgentPrompt":"Issue a Datoka signed execution receipt for agent 'agent-prod-001', run 'run-2024-abc123', step 'step-01', tool 'web-search', outcome 'success', started at 2024-06-10T14:00:00.000Z and completed at 2024-06-10T14:00:02.500Z, with inputHash SHA-256 digest 'a3f1...e9c2' and outputHash SHA-256 digest 'b7d4...1f08', using idempotency key 'idem-run-abc123-step-01'.","exampleUseCases":[{"title":"Audit trail for autonomous agent pipeline","prompt":"My agent just finished a tool call — record a signed Datoka execution receipt for agent 'audit-agent-42', run 'run-pipeline-20240610', step 'step-3', tool 'data-fetch', with a success outcome, timestamps 2024-06-10T09:00:00.000Z to 2024-06-10T09:00:03.200Z, input digest 'c2a1b3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2' and output digest 'f1e2d3c4b5a6978869504132231445566778899aabbccddeeff00112233445566', idempotency key 'idem-audit-42-pipe-20240610-s3'."},{"title":"Tamper-evident proof of successful payment agent step","prompt":"After completing the payment step in my workflow, generate a Datoka signed receipt for agent 'payment-agent-7', run 'txn-run-999', step 'step-pay-1', tool 'execute-payment', outcome 'success', started 2024-06-11T16:30:00.000Z and completed 2024-06-11T16:30:01.800Z, with inputHash digest 'aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899' and outputHash digest '99887766554433221100ffeeddccbbaa99887766554433221100ffeeddccbbaa', key 'idem-pay7-txn999-step1'."},{"title":"Error step attestation for debugging agent runs","prompt":"My agent hit an error on step 5 — I need a Datoka receipt for agent 'debug-agent-12', run 'run-debug-20240612', step 'step-5', tool 'llm-call', outcome 'error', from 2024-06-12T08:15:00.000Z to 2024-06-12T08:15:04.000Z, input hash digest '1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef' and output hash digest 'fedcba0987654321fedcba0987654321fedcba0987654321fedcba0987654321', idempotency key 'idem-dbg12-run20240612-s5'."}],"resultDescription":"Returns a signed execution declaration receipt (datoka.agent.execution.v1) confirming the recorded agent step, including the receipt identifier, cryptographic signatures over the event data, and attestation metadata that can be used for audit, compliance, or verification purposes.","failureModes":["Duplicate idempotency key with different event payload returns a conflict error (use a unique key per distinct event)","Invalid SHA-256 digest format (must be exactly 64 lowercase hex characters) returns a validation error","Malformed timestamp (must be ISO 8601 UTC with milliseconds) returns a schema validation error","Missing required fields (agentId, runId, stepId, tool, outcome, startedAt, completedAt, inputHash, outputHash) returns 422 unprocessable entity","Payment failure or insufficient USDC balance returns 402 Payment Required — retry with same event and idempotency key after resolving payment"],"whenToPreferThis":"Choose this endpoint when you need a paid, cryptographically-signed, tamper-evident receipt for a specific AI agent execution step — particularly for audit trails, compliance records, or verifiable compute proofs where an immutable third-party attestation is required. Prefer this over self-signed or in-process logging when the downstream consumer needs an externally-verifiable declaration of what an agent did, with what inputs and outputs, and at what time.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T00:31:55.262Z","isFirstParty":false,"canonicalSlug":"datoka-agent-execution-receipt-issuer-e747ef25"}