Skip to main content
A coding agent such as Claude Code, Cursor, GitHub Copilot, or Codex can add Reconify event tracking to your codebase, provided it works from the published API instead of invented endpoints and field names. The prompt below keeps it there. One thing stays with you: the credential. The write key comes from Dashboard → Settings → API Keys and goes into your secret manager as RECONIFY_API_KEY, because an agent has no business creating credentials or deciding where secrets live.
An API key never belongs in a prompt, a rules file, or a chat window. The prompt below has the agent read the key from the environment.
Which flow to use is not a decision you make up front. The prompt has the agent work that out from your code and confirm it with you.

Copy this prompt

The prompt runs in four phases and stops for your approval twice, because an agent that starts writing a sender before it understands how your money moves maps the wrong identifiers, and the mapping is the expensive part to fix later. It carries no project-specific detail on purpose, since discovering that is the agent’s first job.
An agent with subagents or a plan mode does best when it uses them for phase 1. Finding every money-movement path in a large codebase is a search problem, and the quality of the mapping depends entirely on that search being complete.

Check what it produced

The mapping the agent proposes is the deliverable worth scrutinizing. A correct one names your own identifiers rather than repeating the documentation: Each value has to serve its own role: reference correlates an operation, and entity_id identifies its wallet or order. The contract allows the same source identifier in both roles where that is genuinely correct. Six mistakes account for most of what agents get wrong against this API:
"amount": 150.00 is rejected. It must be "amount": "150.00". Watch for a float in Python or a bare number in JavaScript.
reference correlates the operation, and entity_id names the wallet or order. Swapping them produces events that never correlate, so every operation looks incomplete.
A uuid4() generated at send time defeats retry safety. The ID must be derived from the source system so the same event produces the same ID twice.
A 202 response does not mean every event was stored. If the code does not loop over results, rejections are silent.
There is no outbound webhook. If the agent added a /webhooks/reconify route, delete it and poll GET /v2/issues?status=open instead.
There is no sandbox. Tests must use a fake HTTP client. Both SDKs support this: pass fetch in TypeScript, or http_client in Python.

Keep the rules in your repo

Agents forget prompts between sessions, and a rules file does not. The text below belongs in AGENTS.md at your repository root, on its own or appended to an existing file. Claude Code, Cursor, Codex, and several other tools read it automatically.
Next: Send events covers the batch handling and retry rules the agent’s sender has to get right.