Problem
There is currently no way in the KoboToolbox API v2 to retrieve historical versions of a submission (the records stored in the InstanceHistory model). This prevents data managers and field teams from:
- Recovering answers as they were before any edits
- Producing reports that faithfully reflect the state of the data at a specific point in time
User story
- As a data manager, I want to call the API to fetch all prior versions of a specific submission so I can reconstruct the sequence of responses and validate any changes.
- As a reporting lead, I need to compare the original and edited versions of submissions to document corrections for donors.
- As an internal auditor, I want to retrieve metadata about each edit (editor, timestamp, fields changed) without needing SQL access or deploying custom code.
Proposal
- Introduce a new API v2 endpoint, for example:
GET /api/v2/assets/{FORM_UID}/instances/{INSTANCE_ID}/history/ - The endpoint returns a JSON array of version objects, e.g.:
[ { "version_id": 123, "date_created": "2025-07-14T09:23:45Z", "edited_by": "user@example.org", "xml": "<data>…</data>" }, { "version_id": 124, "date_created": "2025-07-15T11:02:10Z", "edited_by": "editor@example.org", "xml": "<data>…</data>" } ] - Document the new endpoint in the API reference, including required permissions (e.g.
view_instancehistoryorchange_xform).
- Expected outcome
- Programmatic access to any prior state of a submission
- Simplified auditing and reporting workflows without direct database queries
Thank you very much!! ![]()
