Webhooks transmit data in JSON format. Below is the basic structure of the payload and examples of sample responses sent via webhook for forms created with all types of questions available in Moaform.
You can also receive sample payloads for the forms you've created through test transmissions for reference.
Payload Structure
The payload is primarily composed of event information, form, answers, and thankyou.
Event information contains the basic information of the webhook, including the dispatch conditions. The form holds the basic information of the respective form, and answers contain the detailed data of each response. thankyou contains the information fo the thank you page.
Event information
Basic information of the webhook
ELEMENT
TYPE
DESCRIPTION
event_id
string
Unique ID of the webhook. Assigned automatically
event_type
string
Webhook dispatch condition, currently only 'response_completed' is available
object_type
string
The object_type of the event, currently only 'response' is returned
response_id
string
Unique ID of the response
response_code
string
Response code (The code used when utilizing the 'Restrict to response code and URL' option in Multiple responses settings; only sent when a code value is present)
started_at
string
Timestamp of the response start
submitted_at
string
Timestamp of the response submission
form
The form represents the object of the form, showing information about the survey. Using the API, you can access more detailed information about the form.
ELEMENT
TYPE
DESCRIPTION
form
object
↳ long_id
string
Unique ID of the form
↳ id
string
long_id is the official form ID. For compatibility with older versions, id is temporarily supported but will no longer be available in the future, please use long_id whenever possible.
↳ title
string
From title
↳ answer_url
string
Form URL for collecting responses
↳ report_url
string
Result page URL
hidden
object
↳ d[n]
string
If hidden fields are present, display all hidden fields at the same hierarchy level. n=1~100
answers
answers is an array of objects that display the responses to questions within the form.
ELEMENT
TYPE
DESCRIPTION
answers
[object]
↳ type
string
Answer type
↳ block
object
↳ id
string
Unique ID of the block
↳ type
string
Block type
↳ content
string
Content of the block
...
...
...
The answers > type in the table above shows the type of each response, and the detailed data varies by type. These are described in a separate table below, which replaces the ... position in the table above for each type.
choice (choose one among many choices)
ELEMENT
TYPE
DESCRIPTION
↳ choice
object
↳ id
string
Unique ID of the choice
↳ label
string
Content of the choice
↳ other
string
Comments for 'Other' choice (appears only when the response is 'Other' choice)
↳ score
number
Assigned score (appears only when score is assigned)
choices (choose many among many choices)
ELEMENT
TYPE
DESCRIPTION
↳ choices
[object]
↳ id
string
Unique ID of the choice
↳ label
string
Content of the choice
↳ other
string
Comments for 'Other' choice (appears only when the response is 'Other' choice)
↳ score
number
Assigned score (appears only when score is assigned)
For ranking questions, the order in which the answers are listed represents their ranking.
media_choice (choose one among many media choices)
ELEMENT
TYPE
DESCRIPTION
↳ media_choice
object
↳ id
string
Unique ID of the choice
↳ label
string
Content of the choice
↳ other
string
Comments for 'Other' choice (appears only when the response is 'Other' choice)
↳ score
number
Assigned score (appears only when score is assigned)
↳ media
object
↳ url
string
Media URL
↳ type
string
Media type (currenty returns only 'image')
media_choices (choose many among many media choices)
ELEMENT
TYPE
DESCRIPTION
↳ media_choices
[object]
↳ id
string
Unique ID of the choice
↳ label
string
Content of the choice
↳ other
string
Comments for 'Other' choice (appears only when the response is 'Other' choice)
↳ score
number
Assigned score (appears only when score is assigned)
↳ media
object
↳ url
string
Media URL
↳ type
string
Media type (currenty returns only 'image')
For ranking questions, the order in which the answers are listed represents their ranking.
text (text answers)
ELEMENT
TYPE
DESCRIPTION
↳ text
string
Text input
↳ encrypted
boolean
Response data encrypted or not (appears only when it is "true")
email (email address)
ELEMENT
TYPE
DESCRIPTION
↳ email
string
Email address
↳ encrypted
boolean
Response data encrypted or not (appears only when it is "true")
url (url)
ELEMENT
TYPE
DESCRIPTION
↳ url
string
Website URL
↳ encrypted
boolean
Response data encrypted or not (appears only when it is "true")
number (answers in numbers such as Point Scale, Star rating, Numeric Value)
ELEMENT
TYPE
DESCRIPTION
↳ number
number
Number
↳ encrypted
boolean
Response data encrypted or not (only for Numeric Value block, appears only when it is "true")
address (address)
ELEMENT
TYPE
DESCRIPTION
↳ address
[object]
↳ street
string
street input (appears only when defined as visibile_fields)
↳ detail
string
detail input (appears only when defined as visibile_fields)
↳ city
string
city input (appears only when defined as visibile_fields)
↳ region
string
region input (appears only when defined as visibile_fields)
↳ postal_code
string
postal_code input (appears only when defined as visibile_fields)
↳ country
string
country input (appears only when defined as visibile_fields)
↳ encrypted
boolean
Response data encrypted or not (appears only when it is "true")
files (attachment files)
ELEMENT
TYPE
DESCRIPTION
↳ files
[object]
↳ name
string
File name
↳ size
integer
File size
↳ url
object
↳ api
string
File download API URL (URL that can only be downloaded through the API)
↳ report
string
File download web URL (URL that can be directly downloaded by owners or collaborators who are PRO members)
row (Matrix)
For matirx-type questions, since there is an array of choice and choices, the table for choice or choices is inserted again at the ... position in the table below. In this case, choice or choices are included as a subset of the rows object.
ELEMENT
TYPE
DESCRIPTION
↳ rows
[object]
↳ type
string
Answer type
↳ block
object
↳ id
string
Unique ID of the sub-question
↳ content
string
Content of the sub-question
...
...
...
The answers array is only displayed in the payload if there is response data. If the respondent does not answer a non-mandatory question, or skips a question due to logic, resulting in no response data for that question, the answers array for that question will not be displayed in the payload.
thankyou
Upon completing and finally submitting a response to a form created with Moaform, respondents are always directed to a thank you (closing remarks) page. There can be multiple closing thank you pages, and respondents are directed to one of these pages through logic. The payload will display the id and url of the thank you page that the respondent ultimately reaches.
ELEMENT
TYPE
DESCRIPTION
thankyou
object
↳ id
string
Unique ID of the thank you page
↳ url
string
URL of the thank you page
Payload Example
This is an example payload that includes all types of questions available in Moaform.
{
"event_id": "4ebbbcdb-7f4b-47a9-a72c-1009b4990d12",
"event_type": "response_completed",
"hidden": {
"d1": "andrew"
},
"response_id": "123-45-67890",
"started_at": "2024-02-01T04:50:10Z",
"submitted_at": "2024-02-01T04:55:13Z",
"form": {
"long_id": "ih0vvtuk3o1ns44wow9dkub3",
"id": "ih0vvtuk3o1ns44wow9dkub3",
"title": "Google Gemini User Experience Survey",
"report_url": "https://www.moaform.com/reports/aZlOQ0RjJNR64YWb",
"answer_url": "https://moaform.com/q/yGV1GF"
},
"answers": [
{
"block": {
"id": "cls2lcsmq00082v6moddhz0hs",
"type": "single_choice",
"title": "<p>How often do you use Google Gemini?</p>"
},
"type": "choice",
"choice": {
"id": "cls2lcsmq000a2v6mfnn8y93n",
"label": "<p>Daily</p>",
"score": 1
},
},
{
"block": {
"id": "cls2ldkvd00062v6nbpberh35",
"type": "multiple_choice",
"title": "<p>Which features of Google Gemini do you use? Select all that apply.</p>"
},
"type": "choices",
"choices": [
{
"id": "cls2ldkvd00092v6nfe42p10y",
"label": "<p>Cloud Storage</p>",
"score": 1
},
{
"id": "cls2lu0iy003p2v6n57wd3ave",
"label": "<p>Maps</p>",
"score": 2
},
{
"id": "cls2ldkvd00072v6nvno7ue6h",
"label": "<p>Search Engine</p>",
"score": 3
}
],
},
{
"block": {
"id": "cls2ldvil000c2v6nefizm132",
"type": "dropdown",
"title": "<p>Did you experience any issues while using Google Gemini?</p>"
},
"type": "choice",
"choice": {
"id": "cls2ldvil000e2v6n90i4kec7",
"label": "<p>No</p>",
"score": 2
},
},
{
"block": {
"id": "cls2le19d000i2v6n0ppo6jxl",
"type": "ranking",
"title": "<p>Please rank the following Google Gemini services in order of importance to you.</p>"
},
"type": "choices",
"choices": [
{
"id": "cls2le19d000l2v6n61biepmr",
"label": "<p>Cloud storage space</p>"
},
{
"id": "cls2le19d000j2v6nla70peux",
"label": "<p>Search accuracy</p>"
}
]
},
{
"block": {
"id": "cls2le8ax000o2v6n6eg0bx8a",
"type": "media_single_choice",
"title": "<p>Which type of media do you consume most frequently on Google Gemini platforms?</p>"
},
"type": "media_choice",
"media_choice": {
"id": "cls2m6nhn00402v6nxbmsqna6",
"label": "<p>E-Books</p>",
"score": 5
"media": {
"type": "image",
"url": "https://robohash.org/commodioptioearum.png"
}
},
},
{
"block": {
"id": "cls2lgcvg000u2v6nfh7o8ivp",
"type": "media_multiple_choice",
"title": "<p>Select the types of media you have used or interacted with on Google Gemini services.</p>"
},
"type": "media_choices",
"media_choices": [
{
"id": "cls2lgcvg000v2v6nszdcdswo",
"label": "<p>Video tutorials</p>",
"score": 1,
"media": {
"type": "image",
"url": "https://robohash.org/doloresveldolor.png"
}
},
{
"id": "cls2m79fz00412v6nsff1q9wz",
"label": "<p>News articles</p>",
"score": 4,
"media": {
"type": "image",
"url": "https://robohash.org/nihilrerummaiores.png"
}
}
],
},
{
"block": {
"id": "cls2lgoh100102v6noq3j19po",
"type": "media_ranking",
"title": "<p>Rank the following media types based on your preference for content consumption on Google Gemini.</p>"
},
"type": "media_choices",
"media_choices": [
{
"id": "cls2lgoh100122v6nndvd1m8c",
"label": "<p>Audio Content</p>",
"media": {
"type": "image",
"url": "https://robohash.org/perferendisestomnis.png"
}
},
{
"id": "cls2m864s00442v6nibp8yiey",
"label": "<p>Visual Content</p>",
"media": {
"type": "image",
"url": "https://robohash.org/teneturrationealias.png"
}
},
{
"id": "cls2lgoh100112v6n1z0bpnym",
"label": "<p>Video Content</p>",
"media": {
"type": "image",
"url": "https://robohash.org/minusiureexplicabo.png"
}
},
{
"id": "cls2m80g000432v6n6a74huoc",
"label": "<p>Interactive Content</p>",
"media": {
"type": "image",
"url": "https://robohash.org/aspernaturreprehenderitaut.png"
}
},
{
"id": "cls2lgoh100132v6ngiepv9jk",
"label": "<p>Written Content</p>",
"media": {
"type": "image",
"url": "https://robohash.org/aspernaturautut.png"
}
},
{
"id": "cls2lgoh100152v6nyggfy2y7",
"label": "other",
"other": "You can get anything you want at Alice's restaurant.",
"media": {
"type": "image",
"url": ""
}
},
]
},
{
"block": {
"id": "cls2lv2jp003r2v6nc14yp877",
"type": "point_scale",
"title": "<p>On a scale from -5 to 5, how would you rate the overall performance of Google Gemini?</p>"
},
"type": "number",
"number": 3
},
{
"block": {
"id": "cls2lhfaa001c2v6n703dea3q",
"type": "nps",
"title": "<p>How likely are you to recommend Google Gemini to a friend or colleague? </p>"
},
"type": "number",
"number": 5
},
{
"block": {
"id": "cls2lgyu700162v6nog617gmn",
"type": "rating",
"title": "<p>How would you rate the user interface of Google Gemini?</p>"
},
"type": "number",
"number": 7
},
{
"block": {
"id": "cls2lho58001i2v6n4t10n5oj",
"type": "matrix_single_choice",
"title": "<p>What is your primary purpose for using Google Gemini?</p>"
},
"rows": [
{
"block": {
"id": "cls2lho58001m2v6ns4hdd9nn",
"title": "<p>at Home</p>"
},
"type": "choice",
"choice": {
"id": "cls2lho58001m2v6ns4hdd9nn:cls2lho58001l2v6nueh42tzp",
"label": "<p>Educational activities</p>",
"score": 3
},
},
{
"block": {
"id": "cls2li5zy001o2v6n1dcjwute",
"title": "<p>at Office</p>"
},
"type": "choice",
"choice": {
"id": "cls2li5zy001o2v6n1dcjwute:cls2lho58001j2v6np1atlo93",
"label": "<p>Personal use</p>",
"score": 1
},
}
]
},
{
"block": {
"id": "cls2lictr001p2v6nbqdrpp6s",
"type": "matrix_multiple_choice",
"title": "<p>Which Google Gemini features do you use regularly? Select all that apply.</p>"
},
"rows": [
{
"block": {
"id": "cls2lictr001t2v6nxzl24rsy",
"title": "<p>at Home</p>"
},
"type": "choices",
"choices": [
{
"id": "cls2lictr001t2v6nxzl24rsy:cls2mchoe00462v6n5trjchsw",
"label": "<p>Maps</p>".
"score": 4
}
],
},
{
"block": {
"id": "cls2lictr001u2v6n9xntfosy",
"title": "<p>at Office</p>"
},
"type": "choices",
"choices": [
{
"id": "cls2lictr001u2v6n9xntfosy:cls2lictr001s2v6na1kvxgh8",
"label": "<p>Drive</p>",
"score": 1
},
{
"id": "cls2lictr001u2v6n9xntfosy:cls2lictr001q2v6nh82ekevh",
"label": "<p>Search</p>",
"score": 3
}
],
}
]
},
{
"block": {
"id": "cls2lipfv001w2v6nothvfcj1",
"type": "matrix_ranking",
"title": "<p>Rank the devices you most frequently use to access Google Gemini services.</p>"
},
"rows": [
{
"block": {
"id": "cls2lipfv00202v6nsd0qhctz",
"title": "<p>at Home</p>"
},
"type": "choices",
"choices": [
{
"id": "cls2lipfv00202v6nsd0qhctz:cls2lipfv001x2v6n08hhaqo8",
"label": "<p>Smartphone</p>"
},
{
"id": "cls2lipfv00202v6nsd0qhctz:cls2lipfv001y2v6niexsh5ro",
"label": "<p>Tablet</p>"
},
{
"id": "cls2lipfv00202v6nsd0qhctz:cls2me0bu00492v6nqtwno5mg",
"label": "<p>Smartwatch</p>"
},
{
"id": "cls2lipfv00202v6nsd0qhctz:cls2lipfv001z2v6nygztclsc",
"label": "<p>Laptop</p>"
},
{
"id": "cls2lipfv00202v6nsd0qhctz:cls2mdwe300482v6nzia1b5bc",
"label": "<p>Desktop</p>"
}
]
},
{
"block": {
"id": "cls2lipfv00212v6n0jsyogyx",
"title": "<p>at Office</p>"
},
"type": "choices",
"choices": [
{
"id": "cls2lipfv00212v6n0jsyogyx:cls2lipfv001x2v6n08hhaqo8",
"label": "<p>Smartphone</p>"
}
]
},
{
"block": {
"id": "cls2meu2a004a2v6nqt0ambov",
"title": "<p>at School</p>"
},
"type": "choices",
"choices": [
{
"id": "cls2meu2a004a2v6nqt0ambov:cls2lipfv001y2v6niexsh5ro",
"label": "<p>Tablet</p>"
},
{
"id": "cls2meu2a004a2v6nqt0ambov:cls2mdwe300482v6nzia1b5bc",
"label": "<p>Desktop</p>"
}
]
}
]
},
{
"block": {
"id": "cls2lixno00232v6nrofkx97v",
"type": "long_text",
"title": "<p>What improvements would you like to see in future updates of Google Gemini? </p>",
"encrypted": true
},
"type": "text",
"text": "Culpa architecto nesciunt. Distinctio asperiores dolore. Fuga a consequatur.\nBeatae eum blanditiis. Quia ut aspernatur. Est et est.\nMinus incidunt expedita. Autem vel quia. Nisi nobis quam."
},
{
"block": {
"id": "cls2ljluw002a2v6nhec80sfu",
"type": "short_text",
"title": "<p>What is your favorite aspect of Google Gemini?</p>",
"encrypted": true
},
"type": "text",
"text": "Nemo aperiam voluptatem.\nSunt cum aut.\nVel accusantium deleniti."
},
{
"block": {
"id": "cls2lkb4z002h2v6neg2u3axs",
"type": "address",
"title": "<p>Please provide your full address for our records.</p>",
"encrypted": true
},
"type": "address",
"address": [
{
"street": "1264 Bashirian River"
},
{
"detail": "Apt. 204"
},
{
"city": "Antoinefort"
},
{
"region": "Tennessee"
},
{
"postal_code": "11952"
},
{
"country": "American Samoa"
}
]
},
{
"block": {
"id": "cls2lks7x002o2v6n4o653zs9",
"type": "numeric_value",
"title": "<p>How many years have you been using Google Gemini?</p>",
"encrypted": true
},
"type": "number",
"number": 10
},
{
"block": {
"id": "cls2ll3pd002v2v6n3zja3wmp",
"type": "email",
"title": "<p>Enter your email address to receive updates or to be contacted for further feedback.</p>",
"encrypted": true
},
"type": "email",
"email": "cinthia@hodkiewicz.example"
},
{
"block": {
"id": "cls2llc4b00322v6nsi7sgi9o",
"type": "url",
"title": "<p>If you have a personal website or a portfolio, please enter the URL here.</p>",
"encrypted": true
},
"type": "url",
"url": "http://metz.example/jacinto_christiansen"
},
{
"block": {
"id": "cls2llkus00392v6n0b5heal9",
"type": "file_upload",
"title": "<p>If you have any screenshots of issues or errors, please upload them here.</p>"
},
"type": "files",
"files": [
{
"name": "porro.doc",
"size": 40389,
"url": {
"report": "https://www.moaform.com/reports/aZlOQ0RjJNR64YWb/responses/4EICalTehPKULp1_hzvo2Q/download/submission_files/bab2d598-1405-4da7-82d2-ceabd193e4c5",
"api": "https://api.moaform.com/v1/forms/jW5o2M/responses/123-45-67890/files/bab2d598-1405-4da7-82d2-ceabd193e4c5"
}
]
}
],
"thankyou": {
"id": "cls2lbwjk00010enyd9gjjvur",
"url": "https://answer.moaform.com/answers/jW5o2M/thankyou/Wo2b1Z09wx5"
}
}