Hi Hiral!
Yes, this is absolutely doable, and it’s a fairly common requirement. Let me walk you through your realistic options.
The cleanest approach: External form with API push
The most reliable and truly anonymous setup is to host a simple public web form (this can be as lightweight as a static HTML page or a React app) and have it POST responses to DHIS2 via the Web API. The key is that you never expose your DHIS2 credentials in the frontend. Instead, you create a dedicated low-privilege DHIS2 user (data capture only, restricted to one org unit) and call the API from a thin backend or serverless function that holds those credentials securely.
Depending on your survey structure, you’d POST to either /api/dataValueSets (for aggregate/dataset style surveys) or /api/tracker (if you want each submission as a tracked entity or event). Participants just get a public link, fill in the form, and have no idea DHIS2 is involved. Their responses land directly in your instance.
If you want to stay fully within DHIS2
Create an Event Program for your survey (Event Program is enough for a one-time submission, no need for a full Tracker Program unless you need follow-ups). Then in the sharing settings, grant Public access to Data Capture for the program and all its data elements and option sets. When done correctly, users genuinely don’t need an account to submit.
That said, be thorough with the sharing settings because missing one data element or option set from public access is enough to break the whole thing silently. Also make sure anonymous users have absolutely no view access to other submissions.
Third option: KoboToolbox or ODK
If your team isn’t comfortable with API integration, tools like KoboToolbox were literally built for public survey links. You design the form there, share the link, and then push the collected data into DHIS2 via a script or built-in connector. It adds a second system to manage but it’s much friendlier for non-technical teams.
One thing to keep in mind regardless of approach: never expose admin credentials or broad API tokens in any public-facing code. Always create a minimal-privilege user specifically for this purpose, and consider adding some basic rate limiting so your form isn’t spammed.
For most teams, the external form with API push hits the right balance of security, anonymity and user experience.