POST
/
api
/
v1
/
data-quality
/
batch
JavaScript
const response = await api.quality.evaluateBatch({
  surveyName: 'Customer Satisfaction',
  responses: [{
    responseIdentifier: '54321',
    surveyEntries: [{
        question: 'How satisfied are you?',
        answer: 'I really love playing tennis with my friends on Fridays'
    }]
  }],
  callbackUrl: 'https://example.com/callback'
});
{
  "batchJobId": "123e4567-e89b-12d3-a456-426614174000",
  "status": "queued",
  "results": {
    "items": [],
    "nextCursor": null
  }
}

Authorizations

X-Aftercare-Key
string
header
required

API key for authentication

Body

application/json
surveyName
string
required

The name of the survey

responses
object[]
required
callbackUrl
string
required

URL where results should be sent when processing completes

surveyIdentifier
string

Optional unique identifier for the survey.

Aftercare will use this to build a data model to associate questions and answers with the survey.

surveyDescription
string

A description of the survey purpose and background.

qualityIssues
enum<string>[]

Optional array of specific quality issues to evaluate. If not provided, all applicable quality issues will be checked.

detectionMode
enum<string>

The mode in which Aftercare will evaluate the quality of the survey responses.

  • Responsiveness - Checks for poor responses
  • Authenticity - Checks for fraudulent responses
  • Composite - Checks for all quality issues

If both a detectionMode and qualityIssues are provided, Aftercare will use the detection mode.

Available options:
Responsiveness,
Authenticity,
Composite

Response

Batch evaluation job accepted

batchJobId
string
required

Unique identifier for the batch processing job

status
enum<string>
required

Status values for batch processing jobs

Available options:
queued,
processing,
completed,
failed
results
object