We hope you enjoy our updated documentation! The old documentation website is still available here. Reach out to us with feedback or questions. Happy programming! 🎉
This API checks for the Open-Ended (OE) survey responses to ensure data quality. It performs language comparison, AI-generated answer detection, exclusion list checks, and response deduplication. Implement the API endpoint after every open-ended question into your survey.
PureText Deduplication: Ensures the OE response is unique through deduplication.
Language Mismatch: Compares the language of the OE response with the survey language determined from the transaction ID.
AI Detection: Detects patterns to flag if the OE response is AI-generated content.
Incoherent Response: Flags the obviously unacceptable responses such as gibberish, curse words, etc.
PureText can be effectively used:
For expected responses with at least one meaningful sentence (unlike categorical responses such as brand names, people and place names, etc)
Expected responses are in the same language as survey language (if the survey is in French, response should be only in French)
The API call can be made in two ways:
Individual response: after every open-ended question , or
Bulk processing: at the end of the survey for ALL open-ended responses
In either case, the API response shows you the result for each answer separately.
Up to 20 open-ended responses that can be processed in bulk at a time.
{"transaction_id":"4mWpY50Z5ZpovKkXjt7Liw","questions":[{"question_id":"Q1","text":"OE text goes here, e.g. As an AI language model I don't have a personal opinion."}]}
Request Code Samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl--location--request POST 'https://staging.spectrumsurveys.com/buyers/v3/transactions/ps_api_fail' \
--header'access-token: ' \
--header'Content-Type: application/json' \
--data-raw'{
"transaction_id": "4mWpY50Z5ZpovKkXjt7Liw",
"questions": [
{
"question_id": "Q1",
"text": "OE text goes here, e.g. As an AI language model I don'\''t have a personal opinion."
}
]
}'