---
title: Verify a webhook
slug: campaign/api/verify-a-webhook
docTags: 
createdAt: 2026-09-02T15:04:15.718Z
---

{
  "id": "j3ITNzLL2YiXfUmdz7UKI",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.campaign.episerver.net/rest/{clientId}/webhooks/{webhookId}/verify",
    "servers": [
      {
        "url": "https://api.campaign.episerver.net/rest/{clientId}/webhooks/{webhookId}/verify"
      }
    ],
    "name": "Verify a webhook",
    "description": "<p>Verify a webhook. The request is sent to the configured target URL to check if the webhook is ready to use. If successful, the value \"200\" is returned in the \"httpStatusCode\" field of the JSON response. In case of errors check the \"responseBody\" field.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "clientId",
          "type": "integer<int64>",
          "description": "Client ID",
          "format": "int64"
        },
        {
          "kind": "required",
          "name": "webhookId",
          "type": "integer<int64>",
          "description": "Webhook ID",
          "format": "int64"
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json",
            "application/vnd.optivo.broadmail.v1+json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [
        {
          "kind": "required",
          "name": "mailingId",
          "type": "integer<int64>",
          "description": "<p>ID of a valid mailing (e.g. test mailing in Smart Campaigns). For blacklist webhooks any valid customer's mailing ID can be used.</p>",
          "format": "int64"
        },
        {
          "kind": "optional",
          "name": "numberOfEvents",
          "type": "integer<int32>",
          "description": "<p>Number of events to send (max. 100)</p>",
          "default": 1,
          "format": "int32",
          "minimum": 1,
          "maximum": 100
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "Authorization",
          "name": "Authorization",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "The webhook test request was executed successfully.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "array",
            "description": "",
            "customType": "RestWebhookVerify[]",
            "schema": [
              {
                "name": "id",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Webhook ID",
                "format": "int64"
              },
              {
                "name": "httpStatusCode",
                "kind": "optional",
                "type": "integer<int32>",
                "description": "HTTP status code",
                "format": "int32"
              },
              {
                "name": "responseBody",
                "kind": "optional",
                "type": "string",
                "description": "<p>Response body (if any)</p>"
              },
              {
                "name": "numberOfEvents",
                "kind": "optional",
                "type": "integer<int32>",
                "description": "Number of events sent to the target url",
                "format": "int32"
              },
              {
                "name": "targetUrl",
                "kind": "optional",
                "type": "string",
                "description": "Target URL"
              }
            ],
            "modelRef": "#/components/schemas/RestWebhookVerify",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "The verification of the webhook is not supported for the provided type.",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "oSZiGP2YErr4jvdMqu4KR",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url 'https://api.campaign.episerver.net/rest/{clientId}/webhooks/{webhookId}/verify?mailingId=integer%3Cint64%3E&numberOfEvents=1' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "MiNwizObjCe9TkYWM2IRS",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.campaign.episerver.net/rest/{clientId}/webhooks/{webhookId}/verify?mailingId=integer<int64>&numberOfEvents=1\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "SRGkNUo-Ev4GEgxdnWGIv",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.campaign.episerver.net/rest/{clientId}/webhooks/{webhookId}/verify?mailingId=integer<int64>&numberOfEvents=1\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "g6pYaGXhdWbD5Kj8qVOD9",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.campaign.episerver.net/rest/{clientId}/webhooks/{webhookId}/verify?mailingId=integer<int64>&numberOfEvents=1\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "oSZiGP2YErr4jvdMqu4KR"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// The webhook test request was executed successfully.\n[\n  {\n    \"id\": \"\",\n    \"httpStatusCode\": \"\",\n    \"responseBody\": \"\",\n    \"numberOfEvents\": \"\",\n    \"targetUrl\": \"\"\n  }\n]"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// The verification of the webhook is not supported for the provided type.\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}