Skip to content

Multiple Questions

Multiple Questions

The multipleQuestions API is used to submit a Multiple Questions to the Feedback API. This API is used to collect feedback from users in the form of multiple questions response.

API BASE URL: https://addhuri.com/api/lib/feedback

POST API

This POST request can be used to submit a Multiple Questions to the Feedback API.

Request Endpoint

POST /multipleQuestions

Request Headers

Use the poster API key in the request headers to authenticate the request.

{
"Content-Type": "application/json",
"x-api-key-poster": "YOUR_POSTER_API_KEY",
}

Request Body

{
"questions": [
{
"question": "string",
"options": [
{
"text": "string",
"value": "anytype",
"data": {}
},
{
"text": "string",
"value": "anytype",
"data": {}
}
],
"selectedOptions": [
{
"text": "string",
"value": "anytype",
"data": {}
}
],
"data": {}
},
{
"question": "string",
"options": [
{
"text": "string",
"value": "anytype",
"data": {}
},
{
"text": "string",
"value": "anytype",
"data": {}
}
],
"selectedOptions": [
{
"text": "string",
"value": "anytype",
"data": {}
}
],
"data": {}
}
],
"data": {}
}

Response Body

{
"data": {
"id": "string"
},
"message": "Feedback saved successfully",
"status": "success"
}

Example

Here is an example of how to submit a Multiple Questions to the Feedback API using different programming languages and tools.

const API_BASE_URL = 'https://addhuri.com/api/lib/feedback'
const URL = `${API_BASE_URL}/multipleQuestions`
const POSTER_API_KEY = 'YOUR_POSTER_API_KEY'
fetch(URL, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key-poster': POSTER_API_KEY
},
body: JSON.stringify({
"questions": [
{
"question": "Would you recommend us?",
"options": [
{
"text": "Yes",
"value": 1,
"data": {}
},
{
"text": "Maybe",
"value": 2,
"data": {}
},
{
"text": "No",
"value": 3,
"data": {}
}
],
"selectedOptions": [
{
"text": "Yes",
"value": 1,
"data": {}
}
],
"data": {}
},
{
"question": "What is the best way to get honest user feedback?",
"options": [
{
"text": "Force users to participate",
"value": 1,
"data": {}
},
{
"text": "Create a safe space: Ask for feedback in-app",
"value": 2,
"data": {}
},
{
"text": "Offer no incentives",
"value": 3,
"data": {}
}
],
"selectedOptions": [
{
"text": "Create a safe space: Ask for feedback in-app",
"value": 2,
"data": {}
}
],
"data": {}
}
],
"data": {}
})
})

GET API

This GET request can be used to retrieve records from the Feedback API.

Request Endpoint

GET /multipleQuestions

Request Headers

Use the master API key in the request headers to authenticate the request.

{
"Content-Type": "application/json",
"x-api-key-master": "YOUR_MASTER_API_KEY",
}

Request Query Parameters

Use the following query parameters to retrieve records from the Feedback API.

GET /multipleQuestions?page=1&limit=10

ParameterTypeDefaultMinMaxDescription
pagenumber11-The page number to retrieve.
limitnumber101100The number of items to retrieve per page.

Response Body

The response will contain an array of Multiple Questions.

{
"data": [
{
"type": "MultipleQuestions",
"id": "62a94e41-9de8-447a-9792-e20796a46331",
"createdAt": "2025-01-05T12:53:49.487Z",
"updatedAt": "2025-01-05T12:53:49.487Z",
"questions": [
{
"question": "Would you recommend us?",
"options": [
{
"text": "Yes",
"value": 1,
"data": {}
},
{
"text": "Maybe",
"value": 2,
"data": {}
},
{
"text": "No",
"value": 3,
"data": {}
}
],
"selectedOptions": [
{
"text": "Yes",
"value": 1,
"data": {}
}
],
"data": {}
},
{
"question": "What is the best way to get honest user feedback?",
"options": [
{
"text": "Force users to participate",
"value": 1,
"data": {}
},
{
"text": "Create a safe space: Ask for feedback in-app",
"value": 2,
"data": {}
},
{
"text": "Offer no incentives",
"value": 3,
"data": {}
}
],
"selectedOptions": [
{
"text": "Create a safe space: Ask for feedback in-app",
"value": 2,
"data": {}
}
],
"data": {}
}
],
"data": {}
}
],
"page": 1,
"limit": 10,
"total": 1,
"totalPages": 1,
"message": "",
"status": "success"
}

Example

Here is an example of how to submit a Multiple Questions to the Feedback API using different programming languages and tools.

const API_BASE_URL = 'https://addhuri.com/api/lib/feedback'
const URL = `${API_BASE_URL}/multipleQuestions`
const MASTER_API_KEY = 'YOUR_MASTER_API_KEY'
fetch(URL, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'x-api-key-master': MASTER_API_KEY
}
})