Skip to content
Automations

Developer Instructions for Capturing Data with a Webhook

Customize your website by integrating webhook triggers and automating data collection.

By Red Belt Team | Last Update: October 24, 2026

To get lead data or any data from your site you need to create an automation with a Webhook trigger.

  1. Visit redbeltgym.com.
  2. Sign in to your account.
  3. Click Automation in the left-side menu.
  4. Click + Create new.The Create new button above the automations list
  5. Click Add trigger.The Add trigger button in the automation builder
  6. Select Webhook (Trigger from external apps).The Webhook trigger in the Add Trigger list
  7. The webhook settings open. Click Copy to copy the Webhook URL. To open these settings again later, click the Webhook trigger in the builder.The Webhook URL field and Copy button
  8. Optional: click View dummy payload to see an example request body.
  9. Send a POST request to this Webhook URL with the required data (first name, last name, email, and phone). Click Test your request to check that your integration works.
  10. Click Save.The Save button in the webhook settings
  11. Add at least one action (for example, Tags or SMS), then click Publish. Click Save as draft to finish later.The Save as draft and Publish buttons

Do not delete the Webhook and ensure you use the RBG WP Plugin or use your custom script to send lead data by POST request.

Request Body (JSON):

{
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"phone": "9876540000"
}

Validation Rules:

firstName → required, string
lastName → required, string
email → required, valid email format
phone → required, valid phone number

:point_right: If any field is missing or invalid → API should return 400 Bad Request

Important Notes

  • Content-Type must be: application/json
  • All fields are mandatory
  • Do not send empty strings ("")
  • Ensure proper email & phone format

Example: Using Fetch (JavaScript)

fetch(Endpoint: webhook URL, {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
    },
    body: JSON.stringify({
        firstName: "John",
        lastName: "Doe",
        email: "[email protected]",
        phone: "9876543210",
    }),
}).then((res) => res.json())
.then((data) => console.log(data))
.catch((err) => console.error(err));

Expected Success Response

{
    "success": true,
    "message": "Execution successfully"
}

Summary

  • Method → POST
  • Endpoint → Red belt gym webhook url
  • Body → JSON with 4 required fields
  • Response → success or validation error
Frequently Asked Questions

Common Questions & Troubleshooting

Why is my website form submitting without the required fields?

Your website form is likely submitting without required fields because the client-side (browser) validation is being bypassed or overridden, or because validation is only being performed on the frontend, which can be skipped by bots or older browsers.

How to Fix It

  1. Use type="submit": Ensure your button is a submit type.
  2. Add Backend Validation: Check that mandatory fields are not empty in your PHP/Node/backend script.
  3. Check JavaScript submit(): If using JS, implement checkValidity() before calling .submit().
  4. Use novalidate: If you are building custom validation, add novalidate to the < form > tag to prevent browser-native tooltips from showing while you use your own.
See Pricing