PureSpectrum
PureSpectrum websiteHelp center
PureSpectrum websiteHelp center
  1. PureText
  • Back to home
  • API Reference
  • Feasibility
    • Feasibility & Pricing
  • Attributes
    • Get attribute (V3)
    • Get attributes (V3)
  • Surveys
    • Create survey
    • Get similar surveys
    • Create group multi-country surveys
    • Update survey
    • Update survey
    • Update survey status
    • Update offer price
    • Update group multi-country surveys
    • Get survey information
    • Get survey status
    • Get survey performance
    • Get list of all surveys
    • Surveys health status
    • Pacing details
    • Delete survey
  • Qualifications
    • Add qualification
    • Update qualification
    • Get qualification information
    • Get all qualifications
    • Delete qualification
  • Quotas
    • Add quota
    • Update quota
    • Update quota
    • Get quota information
    • Get quota performance
    • Delete quota
  • Survey group exclusions
    • Create exclusion group
    • Update exclusion group
    • Get exclusion group information
    • Delete exclusion group
  • Respondent inclusion / exclusion
    • Add a PSIDref list to a survey
    • Update a PSIDref for survey
    • Get PSIDref list for survey
  • Supplier management
    • Create supplier blend
    • Update the list of suppliers for a survey
    • Get list of available suppliers in a locale
    • Get list of available suppliers for a survey
    • Get list of supplier blends
  • Traffic Channels
    • Create traffic channel
    • Get a list of traffic channels
  • Transactions
    • Update status of transaction (V2)
    • Update status of transaction (V3)
    • Register transaction as complete
    • Get transaction status (V3)
    • Get transaction info (V3)
    • Get transactions info for a survey ID (V3)
  • Reconciliation
    • Survey reconciliation
    • Multi survey reconciliation
    • Get status of a reconciliation request
    • Get reconciliation status for an adjustment ID
  • PureText
    • PureText Open-ended (OE) check (V3)
      POST
  • Activity logs
    • Get activity logs
    • Get events
  • Templates
    • Get survey templates
  1. PureText

PureText Open-ended (OE) check (V3)

POST
/transactions/ps_api_fail
Last modified:2025-10-05 17:22:06

Description#

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.
This endpoint is using the V3 version of the Buyers API.
Staging: https://staging.spectrumsurveys.com/buyers/v3/transactions
Production: https://api.spectrumsurveys.com/buyers/v3/transactions

Request

Authorization
Add parameter in header
access-token
Example:
access-token: ********************
Body Params application/json

Examples
{
    "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
Go
PHP
Python
C#
Ruby
Request Request Example
Shell
JavaScript
Java
Go
cURL
curl --location 'https://staging.spectrumsurveys.com/buyers/v3/transactions/ps_api_fail' \
--header 'access-token: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
    "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."
        }
    ]
}'

Responses

🟢200Success
application/json
Bodyapplication/json

Examples
{
    "transaction_id": "4mWpY50Z5ZpovKkXjt7Liw",
    "data": [
        {
            "puretext_api_fail": 0,
            "ai_generated_response": 0,
            "incoherent_response": 0,
            "duplicate_response": 0,
            "language_mismatch": 0,
            "question_id": "Q1"
        }
    ]
}
🟠400Bad Request
🟠422Parameter Error
Modified at 2025-10-05 17:22:06
Previous
PureText
Next
Activity logs