Formbricks Open source Forms & Surveys Logo

Client API

API: Update submission

POST
http://localhost:300/api/v1/client/environments/{environmentId}/responses/{responseId}
Update an existing response in a survey.

Parameters

Body

customer
JSON
The customer and metadata you want to link the submission to.
customer.email

*

email
Customer or user email. This is the primary key to identify users
customer.prop
string
Pass value to create user property. You can filter / create cohorts for future surveys based on props.
data
JSON
The content of the submission.
data.fieldName

*

string
Add value to input field by name.
finished
boolean
Determines if submission is marked as complete.

Body Example

{
  "response": {
    data: {
      "clfqjny0v0003yzgscnog1j9i": 10,
      "clfqjtn8n0070yzgs6jgx9rog": "I love Formbricks"
    },
    finished: true, // optional
  },
  "personId: "clfqjny0v000ayzgsycx54a2c",
  "surveyId": "clfqz1esd0000yzah51trddn8"
}

Responses

 
200
success
field namerequireddefaultdescription
responseyes-The response object (answers to the survey). It requires a data object. In this object the key is the questionId, the value the answer of the user to this question.
Was this page helpful?
Previous
Create Response

Need help? 🤓

Join our Discord and ask away. We're happy to help where we can!

Join Discord