Skip to main content
This guide shows how to add Roundtable Proof-of-Human to a Decipher (Forsta) survey so that every respondent is tracked throughout their survey.

Before you start

Decipher only makes API calls to whitelisted domains. Contact Forsta support and ask them to whitelist https://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. Replace YOUR_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):
This gets the session ID with 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 to p.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

Pass the captured session ID as the 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-).
Make sure not to put your secret key in client-side JavaScript — it belongs only in the server-side <exec> and <logic> blocks.

2. Save the response

After calling the API, Roundtable_API.r holds the parsed JSON response. Read the fields you want to track and store them in a hidden text question:
The API returns the risk score (0–100), risk explanation, recommended action, biometric checks, and device checks for the session. For the full response shape and all available fields, see the API Reference.