API Documentation

API Endpoint

Survey Responses

Survey Responses

The SurveyResponse object represents a submitted response to a form within the application.

Survey responses are immutable after submission, meaning users cannot modify their answers once they have been submitted.

This guarantees that the collected data remains consistent and reliable for analysis.

Supported filter params

  • created_at

  • creator_id

  • id

  • survey_id

Supported sort params

  • created_at

  • creator_id

  • custom_fields

  • id

  • survey_id

  • updated_at

GET /api/v2/survey_responses
Requestsreturns survey_responses

GET  /api/v2/survey_responses

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
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": [
    {
      "id": "1",
      "type": "survey_responses",
      "attributes": {
        "survey_fields": null,
        "created_at": "2025-08-02T02:25:51.333+02:00",
        "updated_at": "2025-08-02T02:25:51.333+02:00"
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": "2331"
          }
        },
        "survey": {
          "meta": {
            "included": false
          }
        },
        "creator": {
          "meta": {
            "included": false
          }
        },
        "custom_field_attachments": {
          "meta": {
            "included": false
          }
        }
      }
    }
  ],
  "links": {
    "first": "http://api-test.productive.io/api/v2/survey_responses?page%5Bnumber%5D=1&page%5Bsize%5D=30",
    "last": "http://api-test.productive.io/api/v2/survey_responses?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 survey responses
GET/api/v2/survey_responses


GET /api/v2/survey_responses/1
Requestsreturns survey_response

GET  /api/v2/survey_responses/2

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
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "2",
    "type": "survey_responses",
    "attributes": {
      "survey_fields": null,
      "created_at": "2025-08-02T02:25:51.446+02:00",
      "updated_at": "2025-08-02T02:25:51.446+02:00"
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "2332"
        }
      },
      "survey": {
        "meta": {
          "included": false
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "custom_field_attachments": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

Gets a survey response
GET/api/v2/survey_responses/{id}

URI Parameters
HideShow
id
number (required) Example: 1

survey response id


POST /api/v2/survey_responses
Requestscreates survey_response when params valid

POST  /api/v2/survey_responses

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": "survey_responses",
    "attributes": {
      "survey_id": 24
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "3",
    "type": "survey_responses",
    "attributes": {
      "survey_fields": null,
      "created_at": "2025-08-02T02:25:51.554+02:00",
      "updated_at": "2025-08-02T02:25:51.554+02:00"
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "2333"
        }
      },
      "survey": {
        "meta": {
          "included": false
        }
      },
      "creator": {
        "meta": {
          "included": false
        }
      },
      "custom_field_attachments": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

Create a survey response
POST/api/v2/survey_responses

URI Parameters
HideShow
survey_id
number (required) Example: 1

survey id

creator_id
number (optional) Example: 1

creator id


DELETE /api/v2/survey_responses/1
Requestsdestroyes survey_response

DELETE  /api/v2/survey_responses/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
Responses204
This response has no content.

Deletes a survey response
DELETE/api/v2/survey_responses/{id}

URI Parameters
HideShow
id
number (required) Example: 1

survey response id


Generated by aglio on 02 Aug 2025