How to send webhook to jotForm from my site?

Viewed 121

I'm working to send the data from my server to the webhook. I'm using a "REQUEST" service, but I'm getting an error. My request hits there but I'm getting an error.

var request = require('request');

                          var data:any = [];

                            data[5] = {email5 : "abc@gmail.com"};

                            request.post({

                                "url": "https://api.jotform.com/form/formId/submissions?apiKey=apikey",

                                "json": {

                                    submission : data

                                },

                                "headers": { 

                                    "Content-type": "application/json" 

                                }

                            }, (error:any, response:any) => {

                                if (error) {

                                    console.log(error);

                                }

                                else {

                                    if(response){

                                        console.log(response);

                                        console.log('=================');

                                    }

                                }

                            });

I'm getting an error of questionId. Here is my error

body: { responseCode: 500, message: 'error', content: 'QuestionID not found on form questions!', duration: '29ms' } }

Please help me!

0 Answers
Related