Skip to main content

Create a submission

POST 

/v1/flows/:flow_id/submissions

Creates a submission born completed with initiated_by: "api" and runs the same after-effects a WhatsApp completion runs: notifications, the webhook, forwarding to a connected ODK or FHIR server, Sheets, the live Data tab, and the flow's record action when it has one (the response's record_id names the record). The contact goes through the doorway WhatsApp respondents use: matched by phone or created with consent unknown; the API can never assert opt-in. Answer keys are validated against the flow's current published Flow JSON; values are stored as given. Idempotency-Key is required: same key and body replay the stored response as 200 with Idempotent-Replayed: true; a different body or path under the same key is 422; the same key while the first attempt runs is 409. A retry after a timeout or a 5xx is safe with the same key. Every write happens in one transaction, so a 4xx writes nothing: an update-mode flow whose record cannot be resolved from the answer at its record key is 422 record_not_resolved, safe to retry with the same key once the record exists. No Location header is set; the record's id names it. The body is capped at 262144 bytes (256 KB). 404s for a flow that is not this organisation's. Requires the submissions:write scope; a replayed 200 spends the write bucket like any POST.

Request​

Responses​

Replay of an earlier completed request with the same Idempotency-Key and body: the original response, with Idempotent-Replayed: true.

Response Headers
    Idempotent-Replayed

    Always true on a replay.