---
updatedAt: 2026-07-06T09:16:46.000Z
agentTools:
  projectIndex: https://docs.smartsurvey.io/llms.txt
---

# Insert

Inserts a survey response programmatically; set `status` to `completed`, `partial`, or `disqualified`. Available on selected plans only — contact SmartSurvey Support if you receive 403. See the [Inserting Responses guide](https://docs.smartsurvey.io/docs/inserting-responses) for question-type examples.
            
If you are using the Organisation Hierarchy feature, to assign a response to an entity within the hierarchy, supply either `entity_id` or `entity_unique_id` (not both); the entity must be active and belong to your organisation.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "SS Public API",
    "version": "v2"
  },
  "servers": [
    {
      "url": "https://{host}/v2",
      "description": "Select the host for the region your account's data is stored in.",
      "variables": {
        "host": {
          "default": "api.smartsurvey.io",
          "description": "The regional hostname for your account.",
          "enum": [
            "api.smartsurvey.io",
            "api-eu.smartsurvey.io",
            "api-us.smartsurvey.io"
          ]
        }
      }
    }
  ],
  "paths": {
    "/surveys/{surveyId}/responses": {
      "post": {
        "tags": [
          "SurveyResponses"
        ],
        "summary": "Insert",
        "description": "Inserts a survey response programmatically; set `status` to `completed`, `partial`, or `disqualified`. Available on selected plans only — contact SmartSurvey Support if you receive 403. See the [Inserting Responses guide](https://docs.smartsurvey.io/docs/inserting-responses) for question-type examples.\r\n            \r\nIf you are using the Organisation Hierarchy feature, to assign a response to an entity within the hierarchy, supply either `entity_id` or `entity_unique_id` (not both); the entity must be active and belong to your organisation.",
        "parameters": [
          {
            "name": "surveyId",
            "in": "path",
            "description": "The survey id to insert the response into",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "return",
            "in": "query",
            "description": "How much of the inserted response to return: full (pages/questions/answers with labels), minimal (just the new id — default), or none (empty body, Location header only)",
            "schema": {
              "type": "string",
              "default": "minimal"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SmartSurvey.Public.API.Models.Responses.InsertResponseRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The inserted response",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SmartSurvey.Shared.Models.API.Response"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmartSurvey.Shared.Models.API.Response"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmartSurvey.Shared.Models.API.Response"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/SmartSurvey.Shared.Models.API.Response"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/SmartSurvey.Shared.Models.API.Response"
                }
              }
            }
          },
          "400": {
            "description": "Request validation errors",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Survey not found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "The response validated but could not be persisted (e.g. usage balance consumption failed); nothing was stored",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Microsoft.AspNetCore.Mvc.ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "A URI reference [RFC3986] that identifies the problem type. This specification encourages that, when\r\ndereferenced, it provide human-readable documentation for the problem type\r\n(e.g., using HTML [W3C.REC-html5-20141028]). When this member is not present, its value is assumed to be\r\n\"about:blank\".",
            "nullable": true
          },
          "title": {
            "type": "string",
            "description": "A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence\r\nof the problem, except for purposes of localization(e.g., using proactive content negotiation;\r\nsee[RFC7231], Section 3.4).",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "description": "The HTTP status code([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "description": "A human-readable explanation specific to this occurrence of the problem.",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "description": "A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.",
            "nullable": true
          }
        },
        "additionalProperties": {},
        "description": "A machine-readable format for specifying errors in HTTP API responses based on <see href=\"https://tools.ietf.org/html/rfc7807\" />."
      },
      "Microsoft.AspNetCore.Mvc.ValidationProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "A URI reference [RFC3986] that identifies the problem type. This specification encourages that, when\r\ndereferenced, it provide human-readable documentation for the problem type\r\n(e.g., using HTML [W3C.REC-html5-20141028]). When this member is not present, its value is assumed to be\r\n\"about:blank\".",
            "nullable": true
          },
          "title": {
            "type": "string",
            "description": "A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence\r\nof the problem, except for purposes of localization(e.g., using proactive content negotiation;\r\nsee[RFC7231], Section 3.4).",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "description": "The HTTP status code([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "description": "A human-readable explanation specific to this occurrence of the problem.",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "description": "A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.",
            "nullable": true
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "nullable": true
          }
        },
        "additionalProperties": {}
      },
      "SmartSurvey.Public.API.Models.Responses.InsertResponseAnswer": {
        "type": "object",
        "properties": {
          "choice_id": {
            "type": "integer",
            "description": "The option this cell answers. Required for choice questions, constant-sum/slider rows, ranking, each\r\ninput of a multi-input open-text or AI Follow-Up question, and each level of a cascading dropdown (the\r\nlevel's own option). Omit for single-input open-text (the question identifies the input) and for matrix\r\ncells (use `row_id`/`column_id`).",
            "format": "int32",
            "nullable": true
          },
          "row_id": {
            "type": "integer",
            "description": "The matrix row option id.",
            "format": "int32",
            "nullable": true
          },
          "column_id": {
            "type": "integer",
            "description": "The matrix column option id. On a side-by-side matrix the column must belong to a visible group, and\r\nthe group's format sets the rules for each row: a single-choice group takes one of its columns, a\r\nmultiple-choice group takes several (at most its per-row limit, checked on completed responses), and\r\na text group's cell needs a `value`. A choice group's cell takes no `value`. On a cascading\r\ndropdown this is instead the id of the item chosen at that level.",
            "format": "int32",
            "nullable": true
          },
          "value": {
            "maxLength": 20000,
            "minLength": 0,
            "type": "string",
            "description": "Free text / numeric value / \"other\" text; on a cascading dropdown, the text of the item chosen at that\r\nlevel. For a DateBox question the value must match the question's\r\nconfigured format: `dd/MM/yyyy` (date), `HH:mm` 24-hour (time) or `dd/MM/yyyy HH:mm`\r\n(date and time) — `MM/dd/yyyy` when the question uses the American date order.",
            "nullable": true
          },
          "pins": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SmartSurvey.Public.API.Models.Responses.MapPinRequest"
            },
            "description": "The pins placed on a Map question. Each pin is stored as one row in the survey's map responses;\r\nsupply this instead of `choice_id`/`row_id`/`column_id`/`value` for map questions.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A single answer cell. Which fields are meaningful depends on the question type:\r\n<list type=\"bullet\"><item>`choice_id` — the selected option for choice questions (radio/checkbox/dropdown/list/NPS/image);\r\nthe keyed row for constant-sum/slider; each ranked option for ranking; and the specific input for a\r\n<b>multi-input</b> open-text question (Multiple Textboxes or a multi-date-box range) or an AI Follow-Up\r\nquestion — for those, `choice_id` is <b>required</b> on every cell.</item><item>`row_id` + `column_id` — the cell coordinates for matrix questions.</item><item>Cascading dropdown — one cell per answered level, starting at level 1 with no gaps: `choice_id` is\r\nthat level's option, `column_id` the chosen item's id and `value` the chosen item's text.</item><item>`value` — the free text / numeric value / \"other\" text. For a <b>single-input</b> open-text\r\nquestion (one textbox/essay/date), supply `value` only (no `choice_id`).</item><item>`pins` — the placed pins for a <b>Map</b> question; the other fields are not used.</item></list>"
      },
      "SmartSurvey.Public.API.Models.Responses.InsertResponseQuestion": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The question id.",
            "format": "int32"
          },
          "answers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SmartSurvey.Public.API.Models.Responses.InsertResponseAnswer"
            },
            "description": "The answer cells for this question (several for checkbox/matrix/ranking/multi-textbox/etc.).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A single question and its supplied answer cells."
      },
      "SmartSurvey.Public.API.Models.Responses.InsertResponseRequest": {
        "required": [
          "status"
        ],
        "type": "object",
        "properties": {
          "status": {
            "minLength": 1,
            "type": "string",
            "description": "The outcome to record: `completed`, `partial` or `disqualified`."
          },
          "tracking_link_id": {
            "type": "integer",
            "description": "The tracking link the response is attributed to; omit to use the survey's default tracking link. It must\r\nbe one of this survey's tracking links, otherwise the request is rejected.",
            "format": "int32",
            "nullable": true
          },
          "translation_id": {
            "type": "integer",
            "description": "The SurveyTranslationId (the unambiguous translation/language identifier) to record the response\r\nagainst. Omit (or 0) to use the tracking link's default translation, which itself defaults to the survey's\r\ndefault language. A free-text language code isn't accepted because one code can map to several\r\ntranslations. It must resolve for this survey — one of its own translations or a shared built-in\r\nlanguage template — otherwise the request is rejected.",
            "format": "int32"
          },
          "unique_id": {
            "type": "string",
            "description": "An optional caller-supplied unique id for the response.",
            "nullable": true
          },
          "entity_id": {
            "type": "integer",
            "description": "The numeric id of the entity to assign to this response. Supply either this or\r\n`entity_unique_id`, not both. The entity must be active and belong to your organisation.",
            "format": "int32",
            "nullable": true
          },
          "entity_unique_id": {
            "type": "string",
            "description": "The customer-facing unique code of the entity to assign to this response. Supply either this or\r\n`entity_id`, not both. The entity must be active and belong to your organisation.",
            "nullable": true
          },
          "date_started": {
            "type": "string",
            "description": "When the response was started (optional; defaults to the time of insert). Useful when importing historical responses.",
            "format": "date-time",
            "nullable": true
          },
          "date_ended": {
            "type": "string",
            "description": "When the response was completed (optional; defaults to the time of insert). Useful when importing historical responses.",
            "format": "date-time",
            "nullable": true
          },
          "generate_save_and_continue_link": {
            "type": "boolean",
            "description": "For a partial response, whether to generate and return a save-and-continue link."
          },
          "completion_actions": {
            "type": "string",
            "description": "Which completion side-effects to run for a completed response: `all` (default — full pipeline),\r\n`no_email` (everything except notification + trigger emails), or `none` (finalise with no\r\nemails, webhooks, integrations or AI — typically for imports). Omit for `all`.",
            "nullable": true
          },
          "questions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SmartSurvey.Public.API.Models.Responses.InsertResponseQuestion"
            },
            "description": "The answers, grouped by question.",
            "nullable": true
          },
          "variables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SmartSurvey.Public.API.Models.Responses.InsertResponseVariable"
            },
            "description": "The survey variables to seed, as name/value pairs.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request DTO for inserting a survey response (completed or partial). Answers are grouped by question\r\n(mirroring the GET shape) and flattened into the insert service's per-cell input."
      },
      "SmartSurvey.Public.API.Models.Responses.InsertResponseVariable": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "minLength": 1,
            "type": "string",
            "description": "The variable's name (matched case-insensitively to the survey's defined variables)."
          },
          "value": {
            "type": "string",
            "description": "The value to store.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A survey variable name/value pair."
      },
      "SmartSurvey.Public.API.Models.Responses.MapPinRequest": {
        "type": "object",
        "properties": {
          "latitude": {
            "type": "number",
            "description": "WGS-84 latitude in decimal degrees, -90 to 90.",
            "format": "double",
            "nullable": true
          },
          "longitude": {
            "type": "number",
            "description": "WGS-84 longitude in decimal degrees, -180 to 180.",
            "format": "double",
            "nullable": true
          },
          "comment": {
            "type": "string",
            "description": "An optional comment for this pin (stored when the question allows per-pin comments).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A single pin placed on a Map question."
      },
      "SmartSurvey.Shared.Models.API.AnswerDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "choice_title": {
            "type": "string",
            "nullable": true
          },
          "choice_id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "choice_score_value": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "row_title": {
            "type": "string",
            "nullable": true
          },
          "row_id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "column_title": {
            "type": "string",
            "nullable": true
          },
          "column_id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "column_score_value": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "dropdown_title": {
            "type": "string",
            "nullable": true
          },
          "dropdown_id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "dropdown_score_value": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "value": {
            "type": "string",
            "nullable": true
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "group_id": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "group_title": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SmartSurvey.Shared.Models.API.CustomColumn": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "value": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SmartSurvey.Shared.Models.API.Page": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "position": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "total_score": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "questions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SmartSurvey.Shared.Models.API.QuestionDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SmartSurvey.Shared.Models.API.QuestionDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "sub_type": {
            "type": "string",
            "nullable": true
          },
          "number": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "position": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "total_score": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "answers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SmartSurvey.Shared.Models.API.AnswerDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SmartSurvey.Shared.Models.API.Response": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "survey_id": {
            "type": "integer",
            "format": "int32"
          },
          "tracking_link_id": {
            "type": "integer",
            "format": "int32"
          },
          "translation_id": {
            "type": "integer",
            "format": "int32"
          },
          "unique_id": {
            "type": "string",
            "nullable": true
          },
          "date_started": {
            "type": "string",
            "format": "date-time"
          },
          "date_ended": {
            "type": "string",
            "format": "date-time"
          },
          "date_modified": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "contact_name": {
            "type": "string",
            "nullable": true
          },
          "contact_email": {
            "type": "string",
            "nullable": true
          },
          "contact_invitation_id": {
            "type": "integer",
            "format": "int32"
          },
          "ip_address": {
            "type": "string",
            "nullable": true
          },
          "user_agent": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          },
          "entry_url": {
            "type": "string",
            "nullable": true
          },
          "referer_url": {
            "type": "string",
            "nullable": true
          },
          "edit_url": {
            "type": "string",
            "nullable": true
          },
          "saved": {
            "type": "boolean"
          },
          "saved_name": {
            "type": "string",
            "nullable": true
          },
          "saved_email": {
            "type": "string",
            "nullable": true
          },
          "saved_continue_url": {
            "type": "string",
            "nullable": true
          },
          "current_page_id": {
            "type": "integer",
            "format": "int32"
          },
          "page_path": {
            "type": "string",
            "nullable": true
          },
          "manual_entry": {
            "type": "boolean"
          },
          "total_score": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "href": {
            "type": "string",
            "nullable": true
          },
          "variables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SmartSurvey.Shared.Models.API.Variable"
            },
            "nullable": true
          },
          "contact_data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SmartSurvey.Shared.Models.API.CustomColumn"
            },
            "nullable": true
          },
          "pages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SmartSurvey.Shared.Models.API.Page"
            },
            "nullable": true
          },
          "entity_id": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SmartSurvey.Shared.Models.API.Variable": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "value": {
            "type": "string",
            "nullable": true
          },
          "label": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "Basic": {
        "type": "http",
        "description": "Basic Authorization",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "Basic": []
    }
  ]
}
```