In order to use the API you must have the valid environment-specific username and password. Before any API requests, you need to obtain an API KEY. You will get a valid API KEY by using the VoC authentication API
The API KEY must be sent in the request authorization header element. If the API KEY value is valid then API request will be successful (http status code 200), otherwise it will fail (http status code 401). All API requests must be made over HTTPS.
The current type of the question. Available options: 0 = multi choice, 1 = free text, 3 = No average or NPS, 10 = Only a report title, 11 = Highlight a report title
int
npsQuestion
Available options: 0 = no, 1 = yes
int
yesnoQuestion
Available options: 0 = no, 1 = yes
int
answerOrder
Available options: 1 = Ascending order, 2 = Descending order, -1 = Sequence is not known
int
answerOptions
All options under the question
array
answerOptionUniqueId
The answer option unique id
long
answerDescription
The answer option
string
answerRawValue
0 - N, where N is the number of answerOptions and corresponds to the answer in database
long
answerType
Available options: 0 = normal, 1 = not used in aggregate counting
int
API request and response example
curl -X GET "https://api.confidently.fi/api/responses/test/v2/survey/3974" -H "Authorization: x-api-key {APIKEY}"
Successful API request returns results in JSON format.