IM Mail Form – Webhook Add-on
IM Mail Form Webhook
IM Mail Form Webhook is an add-on for IM Mail Form that automatically sends WordPress form submission data to external systems and APIs.
You can use it to store inquiries in your own database, integrate with CRM platforms or internal business systems, and trigger external processes whenever a form is submitted.
It supports both JSON and Form URL Encoded payloads, with features such as HMAC signatures, delivery logs, automatic retries, and identifiers for preventing duplicate processing.
What You Can Do with Webhooks
When a form is submitted, IM Mail Form Webhook automatically sends the submission data to your configured external endpoint.
- Store submissions in your own database: Send inquiries and application data to a custom API for storage and processing.
- Integrate with CRM systems: Pass customer information to a CRM or sales management system.
- Connect internal business systems: Forward information from document requests, quotation requests, reservations, and other forms to your internal applications.
- Automate workflows: Trigger external services or custom processes when a visitor submits a form.
IM Mail Form handles form creation and webhook delivery, while your receiving system can handle data storage, transformation, and business logic.
How Webhooks Work
Configure a webhook endpoint URL in the IM Mail Form editor. After a visitor submits the form, IM Mail Form Webhook sends an HTTP POST request to the configured endpoint.
Webhook deliveries are processed asynchronously and operate independently of normal email sending.
Your receiving system can parse the request and perform actions such as saving data to a database, calling another API, or starting a custom workflow.
Supported Data Formats and HTTP Specifications
IM Mail Form Webhook 1.3.0 supports two request body formats.
| Item | Specification |
|---|---|
| HTTP method | POST |
| JSON format | application/json (default) |
| Form format | application/x-www-form-urlencoded; charset=UTF-8 |
| Destination | Public HTTPS endpoints on port 443 in normal production environments |
| Timeout | 15 seconds |
| Successful response | HTTP 200–299 |
| Redirects | Not followed |
JSON is a convenient choice when integrating with custom APIs and backend applications. Form URL Encoded requests represent nested values using bracket-notation keys.
JSON Payload Structure
In JSON format, the payload contains four top-level properties:
site: Information about the WordPress website sending the request.form: Information about the form.submission: Identifiers and metadata for the form submission.fields: Submitted field labels and values.
Example JSON Payload
The following example represents a form containing a name field and a multiple-selection field. Its structure follows the Webhook 1.3.0 implementation, while the values are sample data.
{
"site": {
"name": "Example Site",
"url": "https://forms.example.com/"
},
"form": {
"id": 42,
"title": "Contact"
},
"submission": {
"id": "11111111-1111-4111-8111-111111111111",
"inquiry_number": "261105123456",
"submitted_at": "2026-11-05T12:00:00+09:00",
"attempt": 1
},
"fields": {
"name": {
"label": "Name",
"value": "Ada Lovelace"
},
"topics": {
"label": "Topics",
"value": [
"Docs",
"API"
]
}
}
}
Important: This example uses short field IDs for readability. IM Mail Form Core normally generates UUID-based field IDs, and those IDs are used as keys inside the fields object.
Therefore, even if a form field has the Field Name name, it will not necessarily appear as fields.name in the webhook payload.
The example above is formatted for readability. Actual JSON requests are sent in compact form without indentation or extra whitespace.
Payload Properties
| Property | Description |
|---|---|
site.name |
WordPress site name |
site.url |
WordPress site URL |
form.id |
WordPress post ID of the form (integer) |
form.title |
Form title |
submission.id |
UUID identifying the form submission |
submission.inquiry_number |
Inquiry number |
submission.submitted_at |
Submission timestamp |
submission.attempt |
Delivery attempt number, starting at 1 |
fields.<field_id>.label |
Field label |
fields.<field_id>.value |
Submitted field value |
Field Value Types
Regular text values are sent as strings. Even when a visitor enters a number, the value is represented as a JSON string rather than a numeric value.
Checkbox and multi-select fields use arrays of strings.
An empty regular field uses an empty string, while an unselected multiple-selection field uses an empty array.
HTML fields and submit buttons are excluded from the payload.
When implementing a receiver, account for optional or missing fields and differences in value types.
Form URL Encoded Format
You can choose Form URL Encoded instead of JSON.
In this format, nested values are represented using keys such as:
site[name]
site[url]
form[id]
form[title]
submission[id]
submission[attempt]
fields[name][label]
fields[name][value]
fields[topics][value][0]
fields[topics][value][1]
These examples show the key structure in a readable form. In the actual HTTP body, brackets and values are URL-encoded. The identifiers name and topics are sample field IDs.
Spaces are encoded as %20. Empty arrays do not produce key-value pairs.
Authentication and HMAC Signatures
When connecting to an external system, it is important to authenticate requests and verify the integrity of received data.
IM Mail Form Webhook supports the following authentication options:
- No authentication
- Bearer Token authentication
- Custom Header authentication
You can also enable HMAC-SHA256 signatures independently of the selected authentication method.
What Is an HMAC Signature?
An HMAC signature is generated from the request body and a shared secret. The receiving system can verify the signature to check that the request was generated by a party possessing the secret and that the signed content has not been modified.
HMAC signatures can be enabled separately for each webhook and are disabled by default.
Enable HMAC only when your receiving system supports the IM Mail Form signing format. Simply enabling HMAC in the add-on does not automatically make the receiver verify signatures.
HTTP Request Headers
| Header | Description |
|---|---|
Content-Type |
Matches the selected payload format |
User-Agent |
Plugin version and originating site URL |
Accept |
application/json, text/plain, */* |
Authorization |
Sent when Bearer Token authentication is enabled |
Idempotency-Key |
Delivery UUID, included in normal deliveries |
X-IMMF-Webhook-Timestamp |
Unix timestamp, included when HMAC is enabled |
X-IMMF-Webhook-Signature |
HMAC signature, included when HMAC is enabled |
When Custom Header authentication is selected, the configured header name and value are sent instead of Bearer authentication.
The admin interface’s Test Send feature does not create a persistent delivery record, so it does not include an Idempotency-Key header.
How HMAC Signatures Are Calculated
The signature input uses the following format:
v1.<timestamp>.<raw body>
HMAC-SHA256 is calculated over this input using the configured signing secret. The resulting digest is represented as lowercase hexadecimal.
The signature is sent in an HTTP header using this format:
X-IMMF-Webhook-Signature: v1=<64-character hexadecimal signature>
The receiver must verify the signature using the original raw HTTP request body.
Parsing JSON and then serializing it again, or decoding and re-encoding Form URL Encoded data, may change the bytes and cause signature verification to fail.
To reduce replay risks, we recommend accepting timestamps only within five minutes of the receiver’s current time and comparing signatures using a constant-time comparison function.
You can generate a signing secret in the webhook settings. The plaintext secret is shown only immediately after generation, so store it securely in your receiving system.
Delivery Logs and Automatic Retries
If an external endpoint becomes temporarily unavailable, IM Mail Form Webhook provides delivery logs and retry functionality to help you monitor and recover failed requests.
Webhook Logs
The Webhook Logs screen in the WordPress dashboard displays delivery results, HTTP status codes, attempt counts, error details, scheduled retry times, and a history of individual delivery attempts.
When a matching email history record is available in a compatible version of IM Mail Form Core, you can navigate between Email History and Webhook Logs using the shared Submission ID.
Automatic Retry Rules
When automatic retries are enabled, the add-on can make up to three additional attempts after the initial delivery.
| Delivery | Normal delay |
|---|---|
| Initial attempt | Queued after form submission |
| First retry | 1 minute after the previous failure |
| Second retry | 5 minutes after the previous failure |
| Third retry | 30 minutes after the previous failure |
Automatic retries apply primarily to HTTP 408, 429, and 500–599 responses, as well as certain network errors.
When the receiving server returns a valid Retry-After value for an eligible response, the add-on prioritizes that value over the normal retry interval.
HTTP 200–299 responses are treated as successful. Other responses are treated as failures, but not every failure qualifies for an automatic retry.
Retry scheduling uses WordPress WP-Cron, so execution at the exact scheduled time is not guaranteed.
Manual Retries
Failed deliveries can also be retried manually from the WordPress dashboard when the required conditions are met, including the availability of the stored payload within its retention period.
Manual retries use the webhook’s current configuration.
Preventing Duplicate Processing
When receiving webhooks, it is important to handle cases where the same delivery arrives more than once.
For example, your receiving system might successfully save a submission to its database, but the HTTP response could time out before reaching IM Mail Form.
In that situation, the sender cannot determine whether the request was processed. A retry could cause the same data to be received again.
To help receivers prevent duplicate processing, IM Mail Form Webhook includes an Idempotency-Key HTTP header in normal deliveries.
This header contains a UUID assigned to the individual webhook delivery.
The Idempotency-Key remains unchanged when the same delivery is retried.
Your receiving system can store this key and use a unique database constraint or equivalent atomic operation to prevent duplicate records and repeated processing.
Submission ID vs. Delivery ID
- Submission ID: A UUID identifying a single form submission. If one submission is sent to multiple webhooks, they share the same Submission ID.
- Delivery ID: A UUID identifying an individual webhook delivery. It is used as the
Idempotency-Key.
HMAC signatures verify the authenticity and integrity of requests. They do not prevent duplicate processing.
IM Mail Form Webhook does not guarantee exactly-once processing in the receiving system. The receiver must implement appropriate idempotency handling to avoid duplicate operations.
Handling File Uploads
IM Mail Form Webhook also supports forms containing file upload fields.
Instead of embedding file contents directly in JSON or sending files using multipart requests, the add-on sends file metadata and temporary download URLs for files stored in private storage.
Example Attachment JSON
{
"label": "Attachment",
"value": {
"filename": "proposal.pdf",
"size": 8192,
"type": "application/pdf",
"url": "https://forms.example.com/immf-download/0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
}
}
This example shows the attachment field’s data structure. The URL token is a placeholder.
The properties contain:
filename: Original filename after sanitization.size: File size in bytes.type: MIME type.url: Temporary download URL.
If multiple stored files are associated with one field ID, the value property becomes an array of attachment objects.
Private Storage and Download URLs
Uploaded files are stored in private storage outside the web-accessible document root.
The receiving system can retrieve a file using the temporary URL included in the webhook payload.
Each download token is valid for up to 24 hours after issuance. However, the file must also remain within its retention period. If the underlying file expires earlier, the download URL will stop working at that point.
Files can be downloaded multiple times while both the token and the file remain valid.
Important: Anyone who possesses the download URL can retrieve the file. Treat download URLs as sensitive information and do not expose them publicly.
A new download URL is generated for each retry, but retrying does not extend the underlying file’s retention period.
We recommend retrieving required files promptly and storing them securely in your receiving system.
If private storage is unavailable or a secure download URL cannot be generated, the add-on fails the delivery rather than silently omitting the attachment.
How to Set Up a Webhook
1. Open Your Form
In your WordPress dashboard, open IM Mail Form and edit the form you want to connect to an external system.
2. Open the Webhook Tab
Select the Webhook tab in the form editor.
3. Add a Webhook
Create a new webhook configuration.
4. Enter the Endpoint URL
Specify the public HTTPS endpoint that should receive the submission data.
5. Configure the Payload Format and Authentication
Select JSON or Form URL Encoded as the payload format. Configure Bearer Token authentication, a Custom Header, or HMAC signatures when required by your receiving system.
6. Save the Form
Save your webhook configuration.
7. Test the Integration
Use Test Send or submit the form to verify the data received by your endpoint and review the results in Webhook Logs.
Before using the integration in production, we recommend testing successful requests, error responses, and duplicate deliveries caused by retries.
Try It Free for 30 Days
You can try all IM Mail Form Webhook features free for 30 days before purchasing a license.
No payment, account registration, email address, or license key is required to download the free trial.
On non-local websites, the trial begins when IM Mail Form and the Webhook Add-on are both active and WordPress receives its first request.
All add-on features can be used and edited during the 30-day trial.
After the trial ends, the settings become read-only, but existing configurations continue working for another seven days.
After 37 days, new webhook deliveries stop until a license is activated.
Saved settings are not deleted. You can purchase and activate a license to continue using your existing configuration.
Requirements
IM Mail Form Webhook requires the free IM Mail Form Core plugin.
Install and activate IM Mail Form before installing the Webhook Add-on.
Download IM Mail Form Free on WordPress.org
License and Pricing
IM Mail Form Webhook is available as a one-time purchase for $39 + tax.
No recurring subscription is required, and the license includes future updates.
License Scope
A 1-site license can be activated on one normalized hostname.
example.com and www.example.com count as the same site.
Other subdomains, such as shop.example.com, count as separate sites.
Differences in HTTP/HTTPS, port numbers, and URL paths do not affect the site count.
During activation, the add-on sends the normalized hostname to the IM Series License Server to enforce the licensed site limit.
Related Documentation
For more information about IM Mail Form setup, configuration, and features, visit the documentation archive.