Integrations
Integration with Webhook
Send your data to your own endpoint
SnipForm can send your form data to a custom endpoint. This is useful if you want to send the data to a custom backend or if you want to send the data to a third party service.
1. Add your webhook URL
Add your webhook URL to the form's settings.
2. Authenticate your webhook
To ensure that the webhook is under your control, SnipForm requires validation. There are two ways to validate your webhook:
Option 1: Via a response header
On adding your webhook, SnipForm will look for a X-SnipForm-Key
header. If the header is present and the value matches your form's key, then your webhook will be automatically validated.
//my-webhook.php
header('X-SnipForm-Key: dd857370-ab1c-11ed-af4b-7df8007b9b55');
//Node example
response.setHeader('X-SnipForm-Key', 'dd857370-ab1c-11ed-af4b-7df8007b9b55');
Option 2: Via a One Time Pin (OTP)
Once you have added your webhook, SnipForm will generate a One Time Pin (OTP) and send you the standard payload with the OTP where the form data will go. Example:
{
"triggered_ts": 1679682460,
"form_id": "dd857370-ab1c-11ed-af4b-7df8007b9b55",
"form": "My Contact Form",
"ip": "172.28.0.1",
"location": "Denmark",
"data": {
"OTP": "793399"
},
"data_full": [
{
"type": "Text",
"name": "otp",
"label": "OTP",
"value": "793399"
}
]
}
Payload Example
{
"triggered_ts": 1679682460,
"form_id": "dd857370-ab1c-11ed-af4b-7df8007b9b55",
"form": "My Contact Form",
"ip": "172.28.0.1",
"location": "Denmark",
"data": {
"Name": "Jane Doe",
"Email": "[email protected]",
"Message": "Hello SnipForm!",
},
"data_full": [
{
"type": "Text",
"name": "name",
"label": "Name",
"value": "Jane Doe"
},
{
"type": "Email",
"name": "email",
"label": "Email",
"value": "[email protected]"
},
{
"type": "Text",
"name": "message",
"label": "Message",
"value": "Hello SnipForm!"
},
]
}