Before you start
Decipher only makes API calls to whitelisted domains. Contact Forsta support and ask them to whitelisthttps://api.roundtable.ai for your account.
Loading the tracker
Add the following as a top-level element in your survey XML. Placing it at the top level loads the tracker on every page, so behavior is tracked across the entire survey. ReplaceYOUR_SITE_KEY with your site key from the Integration script page on the Roundtable dashboard:
Capturing the session ID
To retrieve a respondent’s data later, you need their session ID. Add the following<style> block inside an early question that every respondent sees (for example, the first question of the survey):
window.getRoundtableSessionId() and makes it available server-side as p.client_roundtable_session_id.
Attach this code to a question the respondent answers and submits — not to a terminal or exit page.
Retrieving session data
The question code above saves the session ID top.client_roundtable_session_id. To pull the risk score and flags for a respondent back into your survey, call the session report endpoint from a Decipher API node. Place this after the last page you’d like to track.
1. Call the report endpoint
sessionId query parameter, and your secret key as a Bearer token in the Authorization header. You can get your secret key from the Secret keys dashboard page (it starts with sk-).

