# Webhooks
Formspark can send webhook events that notify your application any time you receive a form submission.
# Setup
- Define an endpoint on your server for receiving events, this route should listen for
POST
events and return a200
status code. - Paste the endpoint into the
Webhook URL
field found in your form's settings. - Submit to your form and verify your endpoint is receiving submissions successfully.
# Payload format
Given the following form:
<form action="https://submit-form.com/your-form-id">
<input type="text" name="email" />
<textarea name="description" />
<button type="submit">Send</button>
</form>
The body of the POST request will looks as follows:
{
"email": "kramer@nineties.sitcom",
"message": "Who turns down a Junior Mint?"
}
# Testing and troubleshooting
- Your endpoint should accept POST requests.
- Your endpoint should be able to parse a JSON object.
- Your endpoint's url length should not exceed 512 characters.
- You can use a service like httphq.com (opens new window) to preview what the webhook requests will look like.
# Removal
To stop using webhooks, clear the Webhook URL
field found in your form's settings.
← Slack UTM parameters →