Webhook API
With Heyflow's Webhook API, you can send every submission straight to any URL endpoint as soon as it’s submitted.
Once a new response to your flow is submitted, Heyflow forwards (POST) the incoming data to your Webhook URL. You can specify the target API endpoint with this integration.
The body or POST data is a JSON object with four properties.
Example POST data:
{
"fields": [Fields]
"id": "EqSFqTjaFlGZngNrhlDZ",
"flowId": "my-demo-flow-id",
"created": "2020-09-09T15:29:41.706Z"
}
Property | Description |
fields | An array containing all fields and answers. Default or simplified (see below). |
id | The response id, a unique identifier. |
flowId | The ID of the flow from which the response originates. |
created | The date and time when the response was submitted. |
Example
fields
:{
"fields": [
...
{
"label": "Destination",
"variable": "destination",
"id": "mc-c2cc7b93",
"values": [
{
"label": "Spain",
"id": "mco-6417166f"
},
{
"label": "Japan",
"id": "mco-3214944f"
}
]
},
...
],
...
}
By default, the
fields
property is an object that contains four properties
.Property | Description |
label | Takes either the system label or the visible label. If neither is specified, the label equals the id. |
variable | The variable of that field. If undefined, the variable equals the id. |
id | The id of that field. A unique identifier that cannot be changed. |
values | An array that contains all answer values. |
Example
fields[i]
:...
{
"label": "Spain",
"id": "mco-6417166f"
}
...
An (answer) value has two properties:
Property | Description |
label | Takes either the specified answer (e.g., Input field), the system label, or the visible label of that answer field. If neither is specified, the label equals the id. |
id | A unique identifier for that answer field that cannot be changed. |
If a field allows multiple options, e.g., a Multiple Choice or Picture Choice block with multiple selections permitted, the values contain all selected answers. If a field allows only one answer, e.g., an Input block, the array contains just a single element.
Example
fields[i]
(simplified). For the first property, Destination
is the key and Spain, Japan
is the value:{
...
fields: {
"Destination": "Spain, Japan",
"mc-66acbe37": "Backpack",
"mc_gk133l1g": "Camper van",
"My budget:": "5,300 €",
"dub-b6ad4038": "A group",
"mc-bd265168": "Mr",
"First name": "Dustin",
"Last name": "Jaacks",
"Email address": "[email protected]",
"User agreement": "✔"
},
...
}
If the
simplify
option is set, the fields
property is a simple key:value-object.Property | Description |
key | The label of that field. Takes either the system label or the visible label of that answer field. If neither is specified, the label equals the id. |
value | The answer value(s) of that field. Multiple answers are separated by comma (,). |
Last modified 1yr ago