> For the complete documentation index, see [llms.txt](https://userguide.zappost.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://userguide.zappost.com/zap-post-web-app/zap-post-user-guide/zapp/using-the-zapp/settings/webhooks.md).

# Webhooks

The Webhooks page (found under 'Settings') in the ZAP-APP allows you to create webhooks as well as edit and delete them.

### What is a webhook?

A webhook is a way for an application to provide other applications with real-time information. Webhooks provide a powerful mechanism for integrating different services and enabling automation in a streamlined manner.

Any created webhooks also have the option to view the logs giving you more insight into any successes and errors.

<figure><img src="/files/JuRdlxePgQtish7Vb7JN" alt=""><figcaption></figcaption></figure>

### Adding a Webhook

To add a webhook, simply click 'Add New Webhook'. A slide out will then appear allowing you to create your webhook. You'll have the ability to set the following values.

**Name** - An easily recognisable name for the webhook being created.\
**Target URL** - The URL endpoint to which events should be sent.\
**Event Trigger** - When the specific event happens in the ZAP APP, it triggers the webhook.\
**Basic Auth Username** - The username built into the HTTP protocol.\
**Basic Auth Password** - The password built into the HTTP protocol.\
**HTTP Headers** - These let you and the server pass additional information with an HTTP request or response. They're most often used for authentication purposes.\
**Status -** Determines if the webhook is active or inactive.

Once you're done, click 'Create Webhook' and your details will be saved.

<figure><img src="/files/oHA9PHLEC9anh0tJ1IU3" alt=""><figcaption></figcaption></figure>

#### Event Triggers

When creating a webhook, choose the event that should send the request.

The examples below show the typical JSON body for each event. Use your webhook logs to confirm the exact values returned for your account.

**New Submission**

This triggers whenever a new submission is created in ZAP-POST. This includes submissions added in the app via CSV uploads, integration submissions and submissions sent through the API.

<pre class="language-json"><code class="lang-json">{
  "WebhookEventTrigger": "NewSubmission",
  "ScheduledSendId": "9e7c7140-0ab6-4b28-a6cc-3f3de9b5c821",
  "ScheduledSendDateUtc": "2026-05-05",
  "SubmissionId": "5a6d9625-4b8d-41f8-89a8-764b75e1f6d8",
  "CampaignName": "Abandoned Basket Follow-up",
  "CampaignId": "f8a4b8ec-1c6f-4d34-b95a-4d02886a0c5c",
<strong>  "Submissions": [
</strong>    {
      "UniqueIdentifier": "8b2dd7b5-da21-4055-b5a3-82d824031657",
      "CustomerId": "1",
      "Email": "user@email.com",
      "Salutation": "Ms",
      "Firstname": "fname",
      "Surname": "lname",
      "CompanyName": "",
      "Address1": "address1",
      "Address2": "address2",
      "Address3": "address3",
      "City": "city",
      "State": "",
      "Postcode": "pcd1",
      "Country": "UK",
      "Currency": "",
      "Language": "",
      "user_defined_custom_field": "Test Value"
    }
  ]
}
</code></pre>

**Records Rejected**

This triggers during the 'Data cleanse' phase of the ZAP process. During this stage we will execute any end limit checks as well as any address checks. It fires when a record fails validation , address check or hits a send limit and is removed from the send.<br>

{% hint style="warning" %}
Please note, the PAF, Cleanse and Sent Limiter processes are sent as independant Records Rejected Webhooks.
{% endhint %}

```json
{
    "WebhookEventTrigger": "RecordsRejected",
    "ScheduledSendId": "9e7c7140-0ab6-4b28-a6cc-3f3de9b5c821",
    "ScheduledSendDateUtc": "2026-05-05",
    "SubmissionId": "5a6d9625-4b8d-41f8-89a8-764b75e1f6d8",
    "CampaignName": "Abandoned Basket Follow-up",
    "CampaignId": "f8a4b8ec-1c6f-4d34-b95a-4d02886a0c5c",
    "RejectedDateUTC": "2026-05-02T09:15:00Z",
    "Submissions": [
        {
            "UniqueIdentifier": "8b2dd7b5-da21-4055-b5a3-82d824031657",
            "CustomerId": "1",
            "Email": "user@email.com",
            "Salutation": "Ms",
            "Firstname": "fname",
            "Surname": "lname",
            "CompanyName": "",
            "Address1": "address1",
            "Address2": "address2",
            "Address3": "address3",
            "City": "city",
            "State": "",
            "Postcode": "pcd1",
            "Country": "UK",
            "Currency": "",
            "Language": "",
            "RejectedDateUtc": "2026-04-29",
            "RejectedReason": "Deceased and Gone Away"
        },
        {
            "UniqueIdentifier": "3ffc2b49-88f2-4628-b815-06245d4cf67f",
            "CustomerId": "2",
            "Email": "user2@email.com",
            "Salutation": "Ms",
            "Firstname": "fname",
            "Surname": "lname",
            "CompanyName": "",
            "Address1": "address1",
            "Address2": "address2",
            "Address3": "address3",
            "City": "city",
            "State": "",
            "Postcode": "pcd1",
            "Country": "UK",
            "Currency": "",
            "Language": "",
            "RejectedDateUtc": "2026-04-29",
            "RejectedReason": "Send Limiter Rejected"
        },
        {
            "UniqueIdentifier": "c2549451-f3f0-46cd-a2a1-ed369a40bea2",
            "CustomerId": "3",
            "Email": "user3@email.com",
            "Salutation": "Ms",
            "Firstname": "fname",
            "Surname": "lname",
            "CompanyName": "",
            "Address1": "address1",
            "Address2": "address2",
            "Address3": "address3",
            "City": "city",
            "State": "",
            "Postcode": "pcd1",
            "Country": "UK",
            "Currency": "",
            "Language": "",
            "RejectedDateUtc": "2026-04-29",
            "RejectedReason": "Address Match"
        }
    ]
}
```

**Submissions Sent**

This triggers when the final composed mail files are released to print and mail.

```json
{
    "WebhookEventTrigger": "SubmissionSent",
    "ScheduledSendId": "9e7c7140-0ab6-4b28-a6cc-3f3de9b5c821",
    "ScheduledSendDateUTC": "2026-05-05",
    "ZapsSent": [
        {
            "CampaignName": "Abandoned Basket Follow-up",
            "CampaignId": "f8a4b8ec-1c6f-4d34-b95a-4d02886a0c5c",
            "SubmissionId": "5a6d9625-4b8d-41f8-89a8-764b75e1f6d8",
            "ZapsSent": [
                {
                    "UniqueIdentifier": "8b2dd7b5-da21-4055-b5a3-82d824031657",
                    "CustomerId": "1",
                    "Email": "user@email.com",
                    "Salutation": "Ms",
                    "Firstname": "fname",
                    "Surname": "lname",
                    "CompanyName": "",
                    "Address1": "address1",
                    "Address2": "address2",
                    "Address3": "address3",
                    "City": "city",
                    "State": "",
                    "Postcode": "pcd1",
                    "Country": "UK",
                    "Currency": "",
                    "Language": "",
                    "ReturnedDateUtc": "2026-04-29"
                }
            ]
        }
    ]
}
```

**Zap Returned**

This triggers when a mailed ZAP is returned to sender after a delivery attempt.

```json
{
  "WebhookEventTrigger": "ZapReturned",
  "ScheduledSendId": "9e7c7140-0ab6-4b28-a6cc-3f3de9b5c821",
  "ScheduledSendDateUtc": "2026-05-05",
  "SubmissionId": "5a6d9625-4b8d-41f8-89a8-764b75e1f6d8",
  "CampaignName": "Abandoned Basket Follow-up",
  "CampaignId": "f8a4b8ec-1c6f-4d34-b95a-4d02886a0c5c",
  "ZapsReturned": [
     {
      "UniqueIdentifier": "8b2dd7b5-da21-4055-b5a3-82d824031657",
      "CustomerId": "1",
      "Email": "user@email.com",
      "Salutation": "Ms",
      "Firstname": "fname",
      "Surname": "lname",
      "CompanyName": "",
      "Address1": "address1",
      "Address2": "address2",
      "Address3": "address3",
      "City": "city",
      "State": "",
      "Postcode": "pcd1",
      "Country": "UK",
      "Currency": "",
      "Language": "",
      "ReturnedDateUtc": "2026-04-29"
    }
  ]
}
```

**QR Code Scanned**

This triggers when a recipient scans a tracked QR code on the mailed ZAP.

```json
{
    "WebhookEventTrigger": "QRCodeScanned",
    "ScheduledSendId": "9e7c7140-0ab6-4b28-a6cc-3f3de9b5c821",
    "ScheduledSendDateUtc": "2026-05-05",
    "SubmissionId": "5a6d9625-4b8d-41f8-89a8-764b75e1f6d8",
    "CampaignName": "Abandoned Basket Follow-up",
    "CampaignId": "f8a4b8ec-1c6f-4d34-b95a-4d02886a0c5c",
    "DateScannedUtc": "2026-04-30",
    "TimeScannedUtc": "15:31:49",
    "DestinationUrl": "https://www.google.com",
    "DeviceInformation": "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/29.0 Chrome/136.0.0.0 Mobile Safari/537.36",
    "ZapThatScanned": [
        {
            "UniqueIdentifier": "8b2dd7b5-da21-4055-b5a3-82d824031657",
            "CustomerId": "1",
            "Email": "user@email.com",
            "Salutation": "Ms",
            "Firstname": "fname",
            "Surname": "lname",
            "CompanyName": "",
            "Address1": "address1",
            "Address2": "address2",
            "Address3": "address3",
            "City": "city",
            "State": "",
            "Postcode": "pcd1",
            "Country": "UK",
            "Currency": "",
            "Language": ""
        }
    ]
}
```

### Editing Webhooks

To edit a webhook, click on the edit icon on the webhooks page and you can amend any details you need.

### Deleting Webhooks

To delete a webhook, click on the bin incon on the webhooks page, you'll see a pop up asking if you're sure you want to delete.

<figure><img src="/files/Xj8bR5c52uJWXFTAc1jC" alt=""><figcaption></figcaption></figure>

### Webhook Logs

To view the logs for one of your webhooks, click on 'View' from the webhooks page. This will then give you an overview of all logs for that webhook with a quick visual of the Status Code for each event.

<figure><img src="/files/il3sX7hGLNv80OtTHQEt" alt=""><figcaption></figcaption></figure>

You can filter this page based on Target URL, Status Code, From and To Dates and Time.

To see the request and response for each log, click on the view logs icon.

### Requests

When viewing a log, you'll be able to see the request header, a webhook request header is part of the HTTP request sent to a specified URL endpoint when an event triggers the webhook. These headers contain data about the request and help ensure that the receiving server can interpret the incoming data correctly and securely.

You'll also be able to view the request body, a webhook request body contains the actual data payload sent from the source application to the receiving server when an event triggers the webhook. This payload includes detailed information about the event and any relevant data associated with it.

<figure><img src="/files/43BevzUYI2Eic2cdQtVA" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/ibCX0SvHvB67GfbR3MsH" alt=""><figcaption></figcaption></figure>

### Responses

You're also able to view the webhook response header, A webhook response header is part of the HTTP response sent by the server that receives a webhook request. These headers provide information about the response and can include status information, content type, and other metadata.

A webhook response body is the data returned by the server receiving a webhook request. It provides feedback about the result of the webhook processing.

<figure><img src="/files/BHWLu7OXF52CT6KMkcmY" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/xlvjaSgWfb8shaioQe0G" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://userguide.zappost.com/zap-post-web-app/zap-post-user-guide/zapp/using-the-zapp/settings/webhooks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
