1 · Pass the Samply IDs into the survey
URL pre-fill into hidden Text Box fields whose Variable Names match the query-string keys (@HIDDEN). The value is stored because the field is on the submitted instrument.
- In Online Designer, on the FIRST survey instrument, add Text Box fields with Variable Names exactly matching the incoming keys (e.g. messageid, samply_id, participant_code — case-sensitive, no dashes/colons).
- In each field's "Action Tags / Field Annotation" box add @HIDDEN (or @HIDDEN-SURVEY) so participants do not see it.
- Configure the start link so its query keys equal those variable names. REDCap pre-fills and stores them with the response.
- Test: complete a survey via a link with sample values and confirm the export contains the fields.
2 · Register completion
Survey Settings → Survey Termination Options → "Redirect to a URL", piping the stored field as [messageid].
- Make sure messageid was captured into a stored Text Box field (see above).
- On the LAST instrument, open Survey Settings → Survey Termination Options and select "Redirect to a URL".
- Enter: https://samply.uni-konstanz.de/studies/<study-code>/done/[messageid] — REDCap replaces [messageid] with the stored value at submission.
- Save and test end-to-end.
Or register completion silently with a POST
The redirect above navigates the participant's browser to Samply. The same completion can instead be registered server-to-server with an HTTP POST to /studies/<study-code>/done/<message-id> — no request body and no authentication (the message id in the path is the shared secret). Samply replies 200 on success or 400if the id matches no response, and it records the completion and cancels that send's pending reminders exactly like the redirect — just without redirecting. Whether REDCap can issue that POST itself varies:
- REDCap has no path-based webhook, so use one of the relay options below (or just the redirect above).
- Relay via the Data Entry Trigger: set Project Setup → Additional Customizations → Data Entry Trigger to your endpoint. On completion REDCap POSTs the record id (not field values) to it.
- Your relay reads the record id, calls the REDCap API (content=record, fields=messageid) with a stored token to fetch messageid, then POSTs https://samply.uni-konstanz.de/studies/<study-code>/done/<messageid> with no body.
- Alternative: a scheduled API poller that exports newly-completed records, reads messageid, and POSTs Samply — tracking sent ids to avoid duplicates.
- The Data Entry Trigger field and API tokens usually need admin rights; confirm access before relying on this.
POST sources: https://atlas.utdallas.edu/TDClient/30/Portal/KB/Article/1091/REDCap-Project-Setup-Additional-Customizations · https://redcapucdenver.zendesk.com/hc/en-us/articles/31119566714004-Alerts-Notifications
Full request and response details are in the API reference.
Reserved parameters & gotchas
Avoid REDCap's own params (s, __response_hash__). Variable names are case-sensitive, no dashes/colons. CRITICAL: the value is only saved when the instrument holding the field is submitted — keep the hidden fields on the first instrument.
Things to watch out for
- "Redirect to a URL" cannot be combined with "Survey Completion Text".
- Piping into the redirect works for all field types except checkboxes — use a Text Box for messageid.
Sources
These steps were verified against the platform's official documentation.