# Webhooks

Formspark can send webhook events that notify your application any time you receive a form submission.

# Setup

  1. Define an endpoint on your server for receiving events, this route should listen for POST events and return a 200 status code.
  2. Paste the endpoint into the Webhook URL field found in your form's settings.
  3. 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 such as requestcatcher.com (opens new window) to test the integration with your form.

# Removal

To stop using webhooks, clear the Webhook URL field found in your form's settings.