Webhooks

The Webhook system allows you to automatically feed leads from external sources—like Google Ads, custom landing pages, or WordPress forms—directly into your Tripdocks CRM.

Getting Started

To start capturing leads, you need to create a webhook configuration in your Tripdocks dashboard:

  1. Navigate to Settings > Integrations > Webhooks.
  2. Click Add Webhook and give it a descriptive name (e.g., “Google Ads Landing Page”).
  3. Configure your Field Mappings (see below).
  4. Save the webhook to generate your unique Webhook URL.

Your URL will look like this: https://api.tripdocks.com/api/public/webhook/wh_K7mX9pQ2vR4nB8jL1wY6cA3hD5fG0

Sending Data

Webhooks accept POST requests. You can send data in several formats:

  • application/json
  • application/x-www-form-urlencoded
  • multipart/form-data

Example Payload (JSON)

{
  "fullname": "John Doe",
  "email": "john@example.com",
  "phone": "+1234567890",
  "destination": "Maldives",
  "arrival_date": "2026-06-15",
  "notes": "Interested in a honeymoon package"
}

Field Mapping System

When configuring your webhook, you define how fields from your form map to lead properties in Tripdocks.

1. Standard Mappings

Directly map text fields to core lead properties.

  • Targets: Name, Email, Phone

2. Parseable Mappings

Convert form values into specific data types.

  • Targets: ArrivalDate, DepartureDate, TourNights, AdultCount, ChildrenCount
  • Date Handling: We recommend using ISO 8601 format (yyyy-MM-dd). If your form uses a different format (e.g., dd/MM/yyyy), you must specify this in the mapping configuration to ensure accurate parsing.

3. Metadata Mappings

Store additional information (like “Destination” or “Budget”) in the lead’s Source Metadata. These are visible in the lead profile under the “Form Data” section.

Automatic Features

UTM & Tracking Capture

If enabled, Tripdocks automatically detects and stores the following tracking parameters if present in your payload:

  • utm_source, utm_medium, utm_campaign, utm_term, utm_content
  • gclid, fbclid, msclkid

Duplicate Detection

To prevent accidental double-submissions, we use a 5-minute window. If a lead with the same email or phone is received via the same webhook within 5 minutes, it is logged as a duplicate and won’t create a new lead record. The API will still return a 200 OK to ensure your form shows a success message.

Response Codes

StatusMeaningReason
200SuccessLead created or duplicate detected.
400Bad RequestEmpty or invalid payload format.
401UnauthorizedInvalid webhook key.
422UnprocessableMissing required fields (e.g., Name).
429Rate LimitedToo many requests (Limit: 30/min or 500/hr).
503Service UnavailableWebhook is currently set to “Paused”.

JSON Flattening

If your form sends nested JSON, you can access nested fields using dot notation in your mappings (e.g., user.contact.email).