# Send Form Submissions to LeadUp (Webhook Reference)

> Developer reference for the Forms Analysis webhook. URL, X-LeadUp-Secret header, JSON body, tracking fields, status codes, and curl and fetch examples.

Source: https://leadup-marketing.com/docs/forms/send-form-submissions/
Section: Forms Analysis
Last updated: 2026-11-27

## Before you start

- A Forms Analysis client with at least one form (see Set up Forms Analysis)
- The form's webhook URL and secret key from Show Webhook Info

Each Forms Analysis form has its own webhook. Your website backend, form plugin, or automation tool sends one HTTPS `POST` per submission, and LeadUp stores it, scores it with AI, and (if turned on) uploads it to Google Ads. This page is the technical reference.

## Endpoint

Copy the exact URL from LeadUp: open the client in **Forms Analysis**, select the information icon on the form (**Show Webhook Info**), and copy **1. Webhook URL (POST Method)**. It ends with the form's webhook path:

```text
POST YOUR_WEBHOOK_URL
     (…/api/webhook/forms/YOUR_WEBHOOK_PATH)
```

> [!NOTE]
> The hint under **Webhook Path Segment** in the form editor shows the path as `/api/forms/webhook/YOUR_PATH`. That pattern is not the webhook address. Always use the URL from **Show Webhook Info**.

## Headers

| Header | Value | Required |
| --- | --- | --- |
| `Content-Type` | `application/json` | Yes. Other content types, including form-encoded bodies, are rejected. |
| `X-LeadUp-Secret` | The **Secret Key** shown in **Show Webhook Info** | Yes. One secret per client, shared by all of its forms. |

## Body

Send one JSON object per submission, up to 5 MB.

- **Keys must match the form's field names** exactly, including case. A field named `first_name` must be sent as `first_name`, not `firstName`.
- **Extra keys are kept.** Keys that aren't defined as fields are stored with the submission and read by the AI, but get no validation and aren't treated as contact details.
- **Contact details** come from fields of type `email` and `phone`. Include them whenever you have them: they appear on the lead, are format-checked, and are the fallback for Google Ads matching.
- Each request creates a new submission. LeadUp doesn't deduplicate repeated posts, so don't resend a submission that got a `200` response.

### Tracking fields LeadUp reads automatically

These keys are recognized whether or not they are defined as form fields:

| Data | Accepted keys | Used for |
| --- | --- | --- |
| UTM source | `utm_source`, `utmSource` | Source / medium reports |
| UTM medium | `utm_medium`, `utmMedium` | Source / medium reports |
| UTM campaign | `utm_campaign`, `utmCampaign` | Campaign reports and filters |
| UTM term | `utm_term`, `utmTerm`, `utm_keyword`, `utmKeyword` | Keyword reports and filters |
| UTM content | `utm_content`, `utmContent` | Stored with the submission |
| Google click ID | `gclid`, `GCLID` | Google Ads click lookup and conversion upload |
| iOS click IDs | `gbraid`, `GBRAID`, `wbraid`, `WBRAID` | Conversion upload when there's no GCLID |
| Landing page | `landing_page_url`, `landingPageUrl`, `landing_page`, `landingPage`, `page_url`, `pageUrl`, `page_location`, `pageLocation`, `source_url`, `sourceUrl` | **Landing Page Performance** insights |

Send click IDs exactly as they appeared in the landing page URL. Values shorter than 15 characters, or `none`, are ignored for conversion uploads. Capturing them into hidden form fields is covered in [How to capture the GCLID in a website form](https://leadup-marketing.com/blog/capture-gclid-website-form/).

LeadUp also records the IP address and user agent of the request. When you post from a server, these are your server's, not the visitor's.

### Example payload

```json copy title="Example submission"
{
  "first_name": "Alex",
  "last_name": "Sample",
  "email": "alex@example.com",
  "phone": "(310) 555-0142",
  "service": "Roof repair",
  "message": "Leak over the kitchen after last week's storm. Can someone come out this week?",
  "utm_source": "google",
  "utm_medium": "cpc",
  "utm_campaign": "Roofing - Search",
  "utm_term": "roof leak repair",
  "gclid": "YOUR_GCLID_VALUE",
  "landing_page_url": "https://www.example.com/roof-repair"
}
```

## Send from a server, not the browser

Post submissions from your website's backend, a serverless function, or your form tool's webhook feature. The webhook doesn't accept cross-origin requests from browsers, and calling it from page JavaScript would also expose the secret key to every visitor. Capture UTM parameters and click IDs in hidden fields on the page, then forward them with the rest of the submission from the server.

## Examples

```bash copy title="curl"
curl -X POST "YOUR_WEBHOOK_URL" \
  -H "Content-Type: application/json" \
  -H "X-LeadUp-Secret: YOUR_SECRET" \
  -d '{
    "first_name": "Alex",
    "email": "alex@example.com",
    "phone": "(310) 555-0142",
    "message": "Need a quote for a roof repair",
    "utm_source": "google",
    "utm_medium": "cpc",
    "gclid": "YOUR_GCLID_VALUE",
    "landing_page_url": "https://www.example.com/roof-repair"
  }'
```

```javascript copy title="JavaScript (Node.js 18+ or a serverless function)"
const LEADUP_WEBHOOK_URL = "YOUR_WEBHOOK_URL";
const LEADUP_SECRET = "YOUR_SECRET"; // keep in your server's secret storage

export async function sendToLeadUp(submission) {
  const response = await fetch(LEADUP_WEBHOOK_URL, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "X-LeadUp-Secret": LEADUP_SECRET,
    },
    body: JSON.stringify(submission),
  });

  const result = await response.json().catch(() => ({}));
  if (!response.ok || !result.submissionId) {
    // Log it: a 200 without submissionId means LeadUp did not store the submission.
    console.error("LeadUp did not store the submission", response.status, result.message);
  }
  return result;
}
```

## Responses

Responses from the webhook are JSON with `success` and `message`. Check for `submissionId`: only responses that include it mean the submission was stored.

```json title="Stored"
{
  "success": true,
  "message": "Submission received and queued for analysis.",
  "submissionId": "3f2b8c1e-…",
  "jobId": "…"
}
```

| Status | `message` | Stored | What to do |
| --- | --- | --- | --- |
| `200` | Submission received and queued for analysis. | Yes | Nothing. |
| `200` | Submission received but auditing not enabled for this client. | No | The client isn't set up for Forms Analysis. Check the client in LeadUp. |
| `200` | Submission received but user access is inactive. | No | The LeadUp subscription or trial has ended. Restore it under **Settings → Billing & usage**. |
| `200` | Submission received but this client is outside the trial allowance. | No | The trial covers one Forms Analysis client. Upgrade to add more. |
| `200` | Internal configuration error [Missing Secret]. (`success: false`) | No | [Contact support](https://leadup-marketing.com/contact/). |
| `400` | Invalid request format. | No | Send a non-empty body with `Content-Type: application/json`. |
| `400` | Invalid JSON format. | No | Fix the JSON. |
| `401` | Unauthorized: Invalid or missing secret. | No | Send the client's current secret in `X-LeadUp-Secret`. |
| `404` | Form not found or not active. | No | Check the webhook path, and that **Accept submissions** is on for the form. |
| `409` | Duplicate submission detected. | No | Rare. Don't retry. |
| `413` | (not JSON) | No | The body is over 5 MB. Don't send file contents in the JSON. |
| `500` | Internal server error handling webhook. | No | Retry later. |

The `200` responses that don't store anything are deliberate, so form tools don't retry endlessly. Monitor for the missing `submissionId` instead of the status code.

## After a submission arrives

- It appears in the client's **Submissions** tab right away, marked as analyzing until the AI finishes.
- The AI scores it using the submission, the form's fields, the format checks, and the client's AI evaluation context. See [Review form leads](https://leadup-marketing.com/docs/forms/review-form-leads/).
- If a GCLID is present and the client has a Google Ads account in LeadUp, LeadUp looks up the campaign, ad group, and keyword of the click.
- If [form conversion tracking](https://leadup-marketing.com/docs/conversion-tracking/form-conversion-tracking/) is on and the lead passes the filters, it's uploaded to Google Ads.

## Test the webhook

Send the curl example with test values, then open the client's **Submissions** tab. Test submissions are scored, counted in insights, and uploaded to Google Ads like real leads if conversion tracking is on, so test before you turn conversion tracking on, or use a separate test form and keep it out of your reports with the **Form** filter.

## Related

- [Set up Forms Analysis](https://leadup-marketing.com/docs/forms/set-up-forms-analysis/)
- [Review form leads](https://leadup-marketing.com/docs/forms/review-form-leads/)
- [Send scored form leads to Google Ads](https://leadup-marketing.com/docs/conversion-tracking/form-conversion-tracking/)
- [How to capture the GCLID in a website form](https://leadup-marketing.com/blog/capture-gclid-website-form/)
