API Documentation
Surveys ¶
Surveys ¶
The Survey
object represents a form
within the application.
It is the primary container for collecting user responses.
Surveys contain multiple Survey fields
, which represent the questions. These fields can have various types, such as: text, number, etc.
In the application, surveys provide a structured way to gather insights and feedback, making them a key component of user interaction.
Supported filter params
-
created_at
-
creator_id
-
id
-
project_id
-
title
Supported sort params
-
id
-
title
GET /api/v2/surveys
Requests
GET /api/v2/surveys
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": [
{
"id": "2",
"type": "surveys",
"attributes": {
"title": "Survey2",
"description": null,
"public_uuid": "2f3809fc-9729-5a66-ab39-2d9b846cd02e",
"submission_access": "nobody",
"created_at": "2025-08-02T02:25:46.951+02:00",
"updated_at": "2025-08-02T02:25:46.955+02:00"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2281"
}
},
"project": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
},
"updater": {
"meta": {
"included": false
}
}
}
}
],
"links": {
"first": "http://api-test.productive.io/api/v2/surveys?page%5Bnumber%5D=1&page%5Bsize%5D=30",
"last": "http://api-test.productive.io/api/v2/surveys?page%5Bnumber%5D=1&page%5Bsize%5D=30"
},
"meta": {
"current_page": 1,
"total_pages": 1,
"total_count": 1,
"page_size": 30,
"max_page_size": 200
}
}
Get surveysGET/api/v2/surveys
GET /api/v2/surveys/1
Requests
GET /api/v2/surveys/3
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "3",
"type": "surveys",
"attributes": {
"title": "Survey3",
"description": null,
"public_uuid": "e35cb86c-398a-584b-b8d3-b8f97b15203b",
"submission_access": "nobody",
"created_at": "2025-08-02T02:25:47.035+02:00",
"updated_at": "2025-08-02T02:25:47.039+02:00"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2282"
}
},
"project": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
},
"updater": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
POST /api/v2/surveys
Requests
POST /api/v2/surveys
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "surveys",
"attributes": {
"title": "Survey title",
"project_id": 2370
}
}
}
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "4",
"type": "surveys",
"attributes": {
"title": "Survey title",
"description": null,
"public_uuid": "466a5b8f-73be-5793-bb79-6c247f719f61",
"submission_access": "nobody",
"created_at": "2025-08-02T02:25:47.120+02:00",
"updated_at": "2025-08-02T02:25:47.125+02:00"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2283"
}
},
"project": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
},
"updater": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
Create a surveyPOST/api/v2/surveys
URI Parameters
- project_id
number
(required) Example: 1project id
- title
string
(required) Example: Titletitle
- description
string
(optional) Example: Descriptiondescription
PATCH /api/v2/surveys/1
Requests
PATCH /api/v2/surveys/5
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "surveys",
"attributes": {
"title": "new title"
}
}
}
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "5",
"type": "surveys",
"attributes": {
"title": "new title",
"description": null,
"public_uuid": "5df7bdf1-af2c-5379-9d3d-43f5aea60600",
"submission_access": "nobody",
"created_at": "2025-08-02T02:25:47.271+02:00",
"updated_at": "2025-08-02T02:25:47.290+02:00"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2285"
}
},
"project": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
},
"updater": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
DELETE /api/v2/surveys/1
Requests
DELETE /api/v2/surveys/7
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses
This response has no content.
Generated by aglio on 02 Aug 2025