Skip to main content
See Embed the interview for the end-to-end setup.

create_key()

Create a publishable embed key.
The response includes publishable_key and signing_secret. This is the only time they’re returned, so store them immediately.
list[str]
required
Exact origins (scheme, host and port) the widget may load on. The "*" wildcard isn’t allowed.
str | UUID
Pin the key to one study. Omit to allow any study in your organization.
int
Maximum serialized size of the metadata a widget can carry. At least 256.
Returns the API’s JSON response as a dict.

list_keys()

Every embed key in your organization. Secrets are omitted. Returns EmbedKeyListOut.

update_key()

Change allowed origins, revoke or reactivate the key, or adjust the metadata size limit.
list[str]
The replacement list of allowed origins.
str
active or revoked.
int
Maximum serialized metadata size. At least 256.
Returns the API’s JSON response as a dict.

get_snippet()

Generate the HTML install snippet for a study’s interview widget.
str
The key to fill into the snippet. A placeholder is used otherwise.
str
default:"chat"
Widget presentation, set as data-mode.
Returns EmbedSnippetOut:
  • snippet uses the publishable key, with an example data-metadata attribute. Page-supplied metadata can be edited by the visitor.
  • signed_snippet is for signed-token mode: your server mints a JWS (HS256) token with the key’s signing secret, and the token’s metadata is recorded as verified. Use it when the interview relies on a metadata value.