KoBoToolbox webhooks
KoboToolbox webhooks, which KoboToolbox calls REST Services, are POST requests that send each new form submission in a project to an endpoint you register, as JSON or XML.
How KoBoToolbox webhooks work
A REST Service pushes submissions to your system, so you don't have to poll the KoboToolbox API for new ones. It fires on one thing: data is sent only on creation, and nothing is sent when a submission is edited. That means KoboToolbox has no event names, no event field and no event header, so you tell deliveries apart by the service's URL and the submission's own IDs.
A JSON body is the submission itself: one key per question in your form, plus metadata such as _id, _uuid, _submission_time and _xform_id_string. A service can send only a subset of fields, or, for JSON only, wrap the body in a template such as {"fields": %SUBMISSION%}. An XML service sends the submission's XML. Nothing versions the format, so the keys change when your form does.
Key facts
Setting up KoBoToolbox webhooks
- Open the project, go to Settings, then REST Services, and add a service with a name and an Endpoint URL.
- Choose JSON or XML as the Type, set Security to Basic Authorization with a username and password, and turn on email notifications to get failure reports.
- KoboToolbox can't reach your machine, so
hookdeck listen 3000 kobotoolbox --path /webhooks/kobotoolboxgives you a public URL. To test, submit a record from a web form or KoboCollect. - KoboToolbox keeps a log of each service's deliveries. You can retry a failed one there, or retry all of a service's failed deliveries through the API.
Delivery behaviour
30 seconds in the open-source kpi sender, and a read timeout can be retried Retries 3 documented after 60, 600 and 6,000 seconds, but kpi declares a backoff capped at 1,200. For 502, 503, 504 and read timeouts After retries run out marked failed with an email report if you turned it on, and you can retry it from the service's log Duplicates possible after a read timeout or a manual retry, so deduplicate on _uuid Known failure modes
From Hookdeck's KoBoToolbox guide →-
A 500 from your endpoint isn't retried
In the open-source
Plan for the retry limits →kpisender, only502,503,504and read timeouts are retried. A500, a4xxor a connection that never opens fails at once, so return503for a temporary problem and retry failed deliveries from the service's log. -
The retry window may be much shorter than documented
KoboToolbox documents 3 retries over about two hours, but the current
Reconcile after an outage →kpicode declares a backoff capped at 1,200 seconds. Don't rely on the retries to cover an outage: reconcile against the KoboToolbox API afterwards. -
The same submission can arrive twice
If your handler finishes but responds after 30 seconds, KoboToolbox retries a submission you've already stored. Deduplicate on
Deduplicate on the submission →_uuid, and include it if you send a subset of fields, because a subset drops everything you don't list. -
Edits never arrive
KoboToolbox sends a submission only when it's created, and nothing when it's edited. A record corrected after review stays wrong in your system until you sync it through the KoboToolbox API.
Sync edits on a schedule →
KoBoToolbox webhook best practices
- Return
503for a temporary problem. Thekpisender retries502,503,504and read timeouts. A500fails at once. - Deduplicate on
_uuid. A retry after a slow response can repeat a submission you already stored. If you send a subset of fields, include_uuidin it. - Acknowledge within 30 seconds.
Authenticate, store the submission and return
200, then process it from a queue. - Label each project in a custom wrapper. If several projects post to one endpoint, a JSON wrapper lets you route without guessing from question names.
- Sync edits separately. Corrections made after review never arrive as webhooks, so pull them through the KoboToolbox API on a schedule.
- Keep the raw submission. Adding, renaming or regrouping questions changes the keys, and a stored copy lets you reprocess after a form change.
In this hub
| MCP events → | How an agent subscribes to KoBoToolbox events as MCP events. |
| Verify signatures → | Signature facts, verification code and common failures. |
| Production guide → | Production problems, such as timeouts and retries, and how to handle them. |
| Agent skill → | Install the webhook skill in your coding agent. npx skills add hookdeck/webhook-skills --skill kobotoolbox-webhooks |
Keep an outage from costing you KoboToolbox field data.
Event Gateway checks the Basic credentials, stores each submission as it arrives and delivers it to your service with retries you control, so a long outage on your side costs latency rather than submissions.