For the complete documentation index, see llms.txt.

Getting Started

Dernière mise à jour Voir en Markdown

The Contentsquare Responses API gives you programmatic access to your Voice of Customer surveys and their responses. The API is organized around REST. It has predictable resource-oriented URLs, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. All API requests must be made over HTTPS.

Not a developer? Contact your CSM.

  • Base URL of the API: https://api.contentsquare.com/
  • Current version of the API: 1.0
  • Availability: Pro plan, web only. The API must be enabled for your project, otherwise requests return a 403 error.

A Voice of Customer survey created in Contentsquare. Its ID has the form survey_<uuid>. A survey has a type (link, full_screen, popover, button, inline, bubble, or mobile_popover), a language, and an enabled status.

A question inside a survey. Its ID has the form question_<survey_uuid>_<short_id>. Question types are reaction, reaction-binary, long-text, short-text, single-option, multiple-option, email, rating-1-5, rating-1-7, nps, statement, and thank-you.

One respondent's submission to a survey. A response contains answers, an optional comment, tags, and sentiment per answer, and context such as device, browser, OS, country, and the page where the survey was answered.

List endpoints use cursor-based pagination. Send limit (default 20, max 100). If more results exist, the response includes next_cursor. Pass it as cursor in your next request. next_cursor is null on the last page.

Treat cursors as opaque values: don't parse or build them.

{ "results": [ ... ], "next_cursor": "eyJ..." }

The HTTP status code is authoritative. Except for 401 (see below), error responses have a JSON body with a message:

{ "message": "Survey not found." }
StatusMeaning
400Invalid survey ID format, or invalid cursor
401Missing, invalid, or expired access token
403API access not available for this project
404Survey not found
422Invalid query parameter (for example limit out of range). message lists the offending fields

A 401 response is generated by the gateway and has a different body:

{
"success": false,
"errorMessage": "Auth token is invalid.",
"errorCode": "JWT_INVALID"
}