---
title: "Mock Webhook Event"
method: POST
path: "/webhook_registrations/mock_event"
tags: ["Webhooks"]
---

# Mock Webhook Event

`POST /webhook_registrations/mock_event`

Mock a webhook event.

## Request body

- union
  - object
    - `type` 'webhookRegistrationId', required — Mock an event for a specific webhook registration that already exists.
    - `webhookRegistrationId` string — The ID of the webhook registration to mock an event for.
  - object
    - `type` 'mockWebhookRegistration', required — Mock an event for a new webhook registration.
    - `targetUrl` string, uri, required — The URL that will receive webhook events.
    - `secretForHMAC` string — Secret key used for HMAC signature verification of webhook events.
    - `config` union, required
      - object — The webhook configuration to mock an event for.
        - `type` 'consentUpdate-v1', required — Consent Updates are sent when a lead updates their consent status to opt-in or opt-out of communications.
        - `scope` union, required
          - WebhookOrganizationsScopeV1
            - `type` 'organizations', required — Scope the webhook to leads in specific organizations.
            - `organizationIds` string[], required — Array of organization IDs to scope the webhook to.
          - WebhookAccountScopeV1
            - `type` 'account', required — Scope the webhook to leads in the entire account.
        - `includeOptOut` boolean, required — Whether to include opt-out events in the webhook.
        - `includeOptIn` boolean, required — Whether to include opt-in events in the webhook.
      - object — The webhook configuration to mock an event for.
        - `type` 'messageStatus-v1', required — Message Status updates are sent when a message status changes (e.g., delivered, failed).
        - `scope` union, required
          - WebhookOrganizationsScopeV1
            - `type` 'organizations', required — Scope the webhook to leads in specific organizations.
            - `organizationIds` string[], required — Array of organization IDs to scope the webhook to.
          - WebhookAccountScopeV1
            - `type` 'account', required — Scope the webhook to leads in the entire account.

## Response `200`

Returns the mocked webhook event.

- object
  - `willPassValidation` boolean, required — Whether the mock webhook event passed ownership validation when sent to the target URL.
  - `accountId` string, required — The account ID that the current logged in key belongs to. Put here for convenience so you know what to return in the "hustle-webhook-confirmation" header.

---

[API](https://skmtc.net/hustle/apis/hustle-public-api.md) · [All operations](https://skmtc.net/hustle/apis/hustle-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hustle/hustle-public-api/revisions/e920ac8ed225/schema)
