Skip to main content
POST
JavaScript

Authorizations

X-Aftercare-Key
string
header
required

API key for authentication

Body

application/json
surveyIdentifier
string
required

Unique string to identify the survey.

Example:

"CSAT-2024-Q1"

surveyResponses
object[]
required

Full collection of survey responses by question.

surveyName
string

Optional name for the survey. This is used to identify the survey in the Aftercare platform.

Example:

"Customer Satisfaction"

surveyDescription
string

An optional description of the survey's purpose, used to help the AI understand the context behind thesurvey better.

Example:

"Quarterly survey tracking customer satisfaction and loyalty for the XYZ Company which sells xyz products"

Response

Brand coding job accepted

batchJobId
string
required

Unique identifier for the coding job

Example:

"123e4567-e89b-12d3-a456-426614174000"

surveyIdentifier
string
required

Unique identifier for the survey

Example:

"CSAT-2024-Q1"

status
enum<string>
required

Status of the batch job that determines the structure of results

Available options:
queued,
processing,
completed,
partial_failure,
total_failure
results
Success Response · object

The results structure depends on the status value. If the job is successful, the results will be a list of question codes with a hierarchical tree of codes and subcodes. If the job fails, the results will be the error details.