---
title: "Create Webhook Registration"
method: POST
path: "/webhook_registrations"
tags: ["Webhooks"]
---

# Create Webhook Registration

`POST /webhook_registrations`

Create a new webhook registration to receive webhook events. For more information and documentation, see https://api.hustle.com/docs/webhooks.

## Request body

- object
  - `targetUrl` string, uri, required — The URL that will receive webhook events.
  - `secretForHMAC` string, required — Secret key used for HMAC signature verification of webhook events.
  - `config` union, required — The configuration object for the webhook.
    - ConsentUpdateV1Config
      - `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.
    - MessageStatusV1Config
      - `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 `201`

Returns the created webhook registration.

- WebhookRegistration — A webhook registration defines when and where webhook events should be sent.
  - `id` string, required — The ID of the webhook registration.
  - `type` 'webhook_registration', required — The type of object the attached ID corresponds to.
  - `targetUrl` string, uri, required — The URL that will receive webhook events.
  - `config` union, required — The configuration object for the webhook.
    - ConsentUpdateV1Config
      - `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.
    - MessageStatusV1Config
      - `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.
  - `createdAt` string, required — An ISO-8601 string representing the date the webhook registration was created.
  - `secretForHMAC` boolean, required — Whether a secret is currently active for HMAC signature verification of webhook events. We do not ever return the secret so if you have lost your copy, you will need to set a new one.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `422` — Unprocessable Entity
- `500` — Internal Server Error

---

[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)
