Use this method to submit a survey using its ID.
Name | Type | Description |
---|---|---|
surveyId | integer | The identifier of the survey to be submitted, which must match an existing Survey ID stored in the Chat instance. If necessary, contact Inbenta support to activate Surveys in your instance. |
answer | object | The user's answer to the survey. |
This method has no optional parameters.
This method calls the Chat API’s POST /surveys/{surveyId}/submit
endpoint. Please refer to the Response section of the endpoint on the Chat API Routes page for the answer format.
chatbot.api.submitSurvey(<survey_id>, <answer>);