---
updatedAt: 2026-05-21T10:46:43.000Z
agentTools:
  projectIndex: https://docs.qpilot.cloud/llms.txt
---

# Creates a Webhook

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "QPilot API",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.qpilot.cloud"
    }
  ],
  "paths": {
    "/Sites/{siteId}/Webhooks": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Creates a Webhook",
        "parameters": [
          {
            "name": "siteId",
            "in": "path",
            "description": "The site identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "The webhook object",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/QPilot.Core.Models.Dto.Requests.PostPutWebhookDto"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QPilot.Core.Models.Dto.Requests.PostPutWebhookDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/QPilot.Core.Models.Dto.Requests.PostPutWebhookDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/QPilot.Core.Models.Dto.Requests.PostPutWebhookDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/QPilot.Core.Models.Dto.Entities.WebhookDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QPilot.Core.Models.Dto.Entities.WebhookDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/QPilot.Core.Models.Dto.Entities.WebhookDto"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "QPilot.Core.Models.Dto.Entities.WebhookDto": {
        "required": [
          "targetUrl",
          "webhookEventTypes"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "siteId": {
            "type": "integer",
            "format": "int64"
          },
          "createdUtc": {
            "type": "string",
            "format": "date-time"
          },
          "updatedUtc": {
            "type": "string",
            "format": "date-time"
          },
          "webhookEventTypes": {
            "$ref": "#/components/schemas/QPilot.Core.Models.WebhookEventType"
          },
          "targetUrl": {
            "maxLength": 500,
            "minLength": 0,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "QPilot.Core.Models.Dto.Requests.PostPutWebhookDto": {
        "required": [
          "targetUrl",
          "webhookEventTypes"
        ],
        "type": "object",
        "properties": {
          "webhookEventTypes": {
            "$ref": "#/components/schemas/QPilot.Core.Models.WebhookEventType"
          },
          "targetUrl": {
            "maxLength": 500,
            "minLength": 0,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "QPilot.Core.Models.WebhookEventType": {
        "enum": [
          "None",
          "ScheduledOrderCreated",
          "ScheduledOrderUpdated",
          "ScheduledOrderDeleted",
          "ScheduledOrderPaused",
          "ScheduledOrderActivated",
          "PaymentMethodUpdated",
          "ScheduledOrderProcessed",
          "ScheduledOrderFailed",
          "ScheduledOrderItemCreated",
          "ScheduledOrderItemUpdated",
          "ScheduledOrderItemDeleted",
          "ScheduledOrderItemQuantityUpdated",
          "ScheduledOrderItemPriceUpdated",
          "ScheduledOrderItemSalePriceUpdated",
          "ScheduledOrderItemExpired",
          "ShippingRateCreated",
          "ShippingRateUpdated",
          "ShippingRateDeleted",
          "PaymentMethodDeleted",
          "BundleActivated",
          "BundleDeleted",
          "MembershipRuleCreated",
          "MembershipRuleUpdated",
          "MembershipRuleDeleted",
          "LoyaltySettingsCreated",
          "LoyaltySettingsUpdated",
          "LoyaltySettingsDeleted",
          "LoyaltyRedemptionCreated",
          "LoyaltyRedemptionConfirmed",
          "LoyaltyRedemptionRefunded",
          "ScheduledOrderSnoozed",
          "ScheduledOrderReactivated"
        ],
        "type": "string"
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "apiKey",
        "description": "Authorization header using the Bearer scheme. Example: \"Bearer {token}\"",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "Bearer": []
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```