Developers

SubmitSurvey

Usage

Use this method to submit a survey using its ID.

Mandatory parameters

Name Type Description
surveyId integer The identifier of the survey to be submitted, which must match an existing Survey ID stored in the Chatbot instance. If necessary, contact Inbenta support to activate Surveys in your instance.
answer object The user's answer to the survey.

Optional parameters

This method has no optional parameters.

Response data format

This method calls the Chatbot API’s POST /surveys/{surveyId}/submit endpoint. Please refer to the Response section of the endpoint on the Chatbot API Routes page for the answer format.

Example

chatbot.api.submitSurvey(<survey_id>, <answer>);