Lusha Webhooks API

Subscription management for real-time signal callbacks — bulk create and delete up to 25 items per request, account-level HMAC-SHA256 secret with rotation, delivery test, contact opt-out notifications, and a delivery audit log with statistics.

Operations 11

POST /api/subscriptions Create Subscription #
GET /api/subscriptions List Subscriptions #
GET /api/subscriptions/{id} Get Subscription by ID #
PATCH /api/subscriptions/{id} Update Subscription #
POST /api/subscriptions/{id}/test Test Subscription #
POST /api/subscriptions/delete Delete Subscriptions #
GET /api/audit-logs Get Audit Logs #
GET /api/audit-logs/stats Get Audit Log Statistics #
GET /api/account/secret Get Account Secret #
POST /api/account/secret/regenerate Regenerate Account Secret #
POST /api/subscriptions/opt-out Create Opt-Out Subscription #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/lusha-webhooks-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

lusha-webhooks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Lusha Webhooks API
  version: ''
  contact:
    name: Lusha Support
    url: https://api.lusha.com
    email: support@lusha.com
  license:
    name: Proprietary
    url: https://lusha.com/legal/terms
  termsOfService: https://lusha.com/legal/terms
  x-logo:
    url: https://www.lusha.com/logo.png
  x-privacy-policy:
    name: Privacy Policy
    url: https://lusha.com/legal/privacy-notice/
  description: 'Operations tagged Webhooks across 2 of this provider''s published API definitions: lusha-openapi.yml, lusha-v2-openapi.yaml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.lusha.com
  description: Production server
security:
- ApiKeyAuth: []
tags:
- name: Webhooks
  description: "Subscribe to real-time notifications when contacts change jobs or companies experience key business events.\n\nWebhooks deliver HTTP POST requests to your endpoints when signals occur - from promotions and job changes to company growth.\n\n> For a full list of available signals, refer to [**Signal Options**](https://docs.lusha.com/apis/openapi/signals/getsignaloptions).\n---\n**Key Features:**\n- Real-time contact & company signal notifications\n- Bulk subscription management (up to 25 items per request)\n- Secure delivery with HMAC-SHA256 signatures\n- Delivery monitoring with audit logs\n\n **Available Endpoints:**\n\n| Method | Endpoint | Purpose |\n|--------|----------|---------|\n| POST | `/api/subscriptions` | Create subscriptions (bulk supported) |\n| GET | `/api/subscriptions` | List all subscriptions |\n| GET | `/api/subscriptions/{id}` | Get subscription by ID |\n| PATCH | `/api/subscriptions/{id}` | Update subscription |\n| POST | `/api/subscriptions/delete` | Delete subscriptions (bulk supported) |\n| POST | `/api/subscriptions/{id}/test` | Test subscription delivery |\n| GET | `/api/audit-logs` | Get webhook delivery logs |\n| GET | `/api/audit-logs/stats` | Get delivery statistics |\n| GET | `/api/account/secret` | Get account webhook secret |\n| POST | `/api/account/secret/regenerate` | Regenerate account secret |\n| POST | `/api/subscriptions/opt-out` | Subscribe to contact opt-out notifications |\n\n> **Webhook Delivery Acknowledgment:** When receiving webhook deliveries (POST requests), your endpoint must acknowledge with a specific response format. See the [Create Subscription](#operation/createSubscription) endpoint for the required acknowledgment structure.\n      ---\n\n<details>\n<summary><strong>Rate Limits</strong></summary>\n\n| Operation | Limit |\n|-----------|-------|\n| API Requests | 100 requests/minute per account |\n| Create Subscriptions | 25 items per request |\n| Delete Subscriptions | 25 items per request |\n\n</details>\n\n---\n\n<details>\n<summary><strong>Security & Verification</strong></summary>\n\n**HTTPS Requirement:**\n- Production webhook URLs **must** use HTTPS\n- HTTP URLs are not accepted\n\n**Signature Verification:**\n\nAll webhook deliveries include an `X-Lusha-Signature` header containing an HMAC-SHA256 signature. Verify this signature to ensure the request is from Lusha:\n\n1. Extract the `X-Lusha-Signature` and `X-Lusha-Timestamp` headers\n2. Concatenate: `timestamp + \".\" + JSON.stringify(payload)`\n3. Compute HMAC-SHA256 using your webhook secret\n4. Compare the computed signature with the received signature\n\n**Example (Node.js):**\n```javascript\nconst crypto = require('crypto');\n\nfunction verifySignature(payload, signature, timestamp, secret) {\n  const signedPayload = `${timestamp}.${JSON.stringify(payload)}`;\n  const expectedSignature = crypto\n    .createHmac('sha256', secret)\n    .update(signedPayload)\n    .digest('hex');\n  \n  return crypto.timingSafeEqual(\n    Buffer.from(signature),\n    Buffer.from(expectedSignature)\n  );\n}\n```\n\n> **Security Best Practice:** Always verify webhook signatures to prevent spoofed requests.\n\n</details>\n\n---\n\n<details>\n<summary><strong>Credits & Billing</strong></summary>\n\n**Credit Charges:**\n- Credits are charged when signals are detected and delivered to your webhook\n- The `creditsCharged` field in the webhook payload indicates how many credits were used\n- Credits are deducted from your account balance per signal type\n\n**No Duplicate Charges:**\n- Each signal is delivered once and charged once\n- Webhook delivery retries do not incur additional charges\n\n</details>\n\n---\n\n<details>\n<summary><strong>Error Response Format</strong></summary>\n\nAll error responses follow this format:\n```json\n{\n  \"statusCode\": 400,\n  \"message\": \"Validation failed\",\n  \"errors\": [\"entityType must be one of: contact, company\"]\n}\n```\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `statusCode` | number | HTTP status code |\n| `message` | string | Error message |\n| `errors` | string[] | Detailed error messages (optional) |\n\n</details>\n    \n---\n"
  x-tag-expanded: true
paths:
  /api/subscriptions:
    post:
      tags:
      - Webhooks
      summary: Create Subscription
      description: "Creates one or more webhook subscriptions for real-time signal notifications.\n\n**Delivery & Reliability:**\n- Webhooks are delivered with automatic retry on failures\n- Maximum 3 retry attempts with exponential backoff\n- Subscriptions auto-disable after max retries exceeded\n- All deliveries are logged in audit logs\n\n> **Note:** Your webhook endpoint must respond with a proper acknowledgment. \n See Client Response Format below for details.\n\n> **Limit:** Maximum 25 subscriptions per request\n\n*Endpoint*: **(POST) https://api.lusha.com/api/subscriptions**\n\n---\n\n### Webhook Payload You'll Receive\n When a signal is triggered, this payload is sent to your webhook URL:\n```json\n    {\n      \"id\": \"f3b87e05-0402-4f3e-8e26-6a38fd0ad62c\",\n      \"type\": \"promotion\",\n      \"entityType\": \"contact\",\n      \"entityId\": \"4158887495\",\n      \"subscriptionId\": \"507f1f77bcf86cd799439011\",\n      \"data\": {\n        \"personId\": 4158887495,\n        \"currentCompanyId\": 40823133,\n        \"currentCompanyName\": \"OMG Hospitality Group LLC\",\n        \"currentDomain\": \"omghospitalitygroup.com\",\n        \"currentTitle\": \"Bartender\",\n        \"currentDepartments\": [\n          { \"id\": 7, \"value\": \"Other\" }\n        ],\n        \"previousCompanyName\": \"First Watch Restaurants\",\n        \"previousDomain\": \"firstwatch.com\",\n        \"signalDate\": \"2025-07-01\"\n      },\n      \"timestamp\": \"2026-01-14T16:16:35.841Z\",\n      \"billing\": {\n        \"creditsCharged\": 1\n      }\n    }\n    ```\n            **Example — Company News Signal:**\n    ```json\n            {\n              \"id\": \"a7c92f14-1234-4b3e-9d22-8b4fe1d0bc45\",\n              \"type\": \"commercialActivityNews\",\n              \"entityType\": \"company\",\n              \"entityId\": \"33222678\",\n              \"subscriptionId\": \"507f1f77bcf86cd799439011\",\n              \"data\": {\n                \"companyId\": \"33222678\",\n                \"companyName\": \"Lusha\",\n                \"domain\": \"lusha.com\",\n                \"signalId\": \"1503910\",\n                \"eventType\": \"partnership\",\n                \"eventSummary\": \"Lusha announced a strategic partnership with Salesforce.\",\n                \"articlePublishedDate\": \"2025-06-15\",\n                \"articleTitle\": \"Lusha Partners with Salesforce\",\n                \"articleHighlight\": \"The partnership enables Salesforce users to access Lusha data directly within their CRM.\",\n                \"eventEffectiveDate\": \"2025-06-10\",\n                \"articleUrl\": \"https://example.com/lusha-salesforce-partnership\"\n              },\n              \"timestamp\": \"2026-01-14T16:16:35.841Z\",\n              \"billing\": {\n                \"creditsCharged\": 1\n              }\n            }\n          ```\n\n      **Headers Included:**\n\n      | Header | Description |\n      |--------|-------------|\n      | `X-Lusha-Signature` | HMAC-SHA256 signature for verification |\n      | `X-Lusha-Timestamp` | Unix timestamp of the request |\n      | `Content-Type` | application/json |\n      | `User-Agent` | Lusha-Webhooks/1.0 |\n\n\n---\n⚠️ **Important:** Ensure your account has a webhook secret before creating subscriptions.\nCreate one via the [Regenerate Account Secret](#operation/regenerateAccountSecret) endpoint.\n\n---\n\n### Client Response Format (Required)\n\nWhen your webhook endpoint receives a delivery, it **must** acknowledge receipt with this response:\n\n  **Required Response:**\n  ````json\n  {\n    \"received\": true,\n    \"timestamp\": \"2026-02-05T10:30:45.123Z\",\n    \"webhookId\": \"f3b87e05-0402-4f3e-8e26-6a38fd0ad62c\"\n  }\n  ````\n\n<details>\n<summary><strong>Response Requirements</strong></summary>\n\n  | Requirement | Value |\n  |-------------|-------|\n  | **HTTP Status** | `201 Created` (recommended) or any `2xx` status |\n  | **Content-Type** | `application/json` |\n  | **Response Time** | Within 10 seconds |\n</details>\n\n\n<details>\n<summary><strong>Field Descriptions & Implementation Guide</strong></summary>\n\n  **Field Descriptions:**\n  * `received` (boolean, required): Confirmation flag - must be `true`\n  * `timestamp` (string, required): ISO 8601 timestamp of receipt\n  * `webhookId` (string, required): Echo the `id` from webhook payload\n\n  **Implementation Example:**\n  ```javascript\n  app.post('/webhook', async (req, res) => {\n    // 1. Verify signature\n    if (!verifyWebhookSignature(req)) {\n      return res.status(401).json({ error: 'Invalid signature' });\n    }\n    \n    // 2. Queue for async processing\n    await queueWebhook(req.body);\n    \n    // 3. Acknowledge immediately\n    res.status(201).json({\n      received: true,\n      timestamp: new Date().toISOString(),\n      webhookId: req.body.id\n    });\n    ```\n\n  **Important Notes:**\n  * Return acknowledgment **before** heavy processing\n  * Non-2xx responses trigger retry mechanism\n  * After 3 failed retries, subscription is disabled\n\n  </details>\n\n----\n"
      operationId: createSubscription
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSubscriptionRequest'
            examples:
              singleSubscription:
                summary: Create a single subscription
                value:
                  defaults:
                    entityType: contact
                    signalTypes:
                    - promotion
                    - companyChange
                    url: https://example.com/webhooks/lusha
                  subscriptions:
                  - entityId: '123456'
                    name: My Test Webhook
              multipleSubscriptions:
                summary: Create multiple subscriptions with shared URL
                value:
                  defaults:
                    entityType: contact
                    signalTypes:
                    - promotion
                    - companyChange
                    url: https://example.com/webhooks/lusha
                  subscriptions:
                  - entityId: '123'
                    name: Contact 123
                  - entityId: '456'
                    name: Contact 456
                  - entityId: '789'
                    name: Contact 789
              mixedEntityTypes:
                summary: Mixed entity types with shared URL
                value:
                  defaults:
                    signalTypes:
                    - promotion
                    - itSpendIncrease
                    url: https://example.com/webhooks/lusha
                  subscriptions:
                  - entityType: contact
                    entityId: '123'
                  - entityType: company
                    entityId: '456'
      responses:
        '201':
          description: Subscriptions created (full or partial success)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSubscriptionResponse'
              examples:
                allSuccessful:
                  summary: All subscriptions created successfully
                  value:
                    total: 3
                    successful: 3
                    failed: 0
                    results:
                    - index: 0
                      success: true
                      subscription:
                        id: 507f1f77bcf86cd799439011
                        entityType: contact
                        entityId: '123'
                        signalTypes:
                        - promotion
                        - companyChange
                        url: https://example.com/webhooks/lusha
                        name: Contact 123
                        isActive: true
                        createdAt: '2026-02-02T10:00:00.000Z'
                        updatedAt: '2026-02-02T10:00:00.000Z'
                partialSuccess:
                  summary: Some subscriptions failed (partial success)
                  value:
                    total: 3
                    successful: 2
                    failed: 1
                    results:
                    - index: 0
                      success: true
                      subscription:
                        id: 507f1f77bcf86cd799439011
                        entityType: contact
                        entityId: '123'
                        signalTypes:
                        - promotion
                        - companyChange
                        url: https://example.com/webhooks/lusha
                        name: Contact 123
                        isActive: true
                        createdAt: '2026-02-02T10:00:00.000Z'
                        updatedAt: '2026-02-02T10:00:00.000Z'
                    - index: 1
                      success: false
                      error:
                        code: DUPLICATE_SUBSCRIPTION
                        message: Subscription already exists for entity type 'contact' with entity ID '456'
        '400':
          description: Bad request - URL validation failed or invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                statusCode: 400
                message: Validation failed
                errors:
                - 'entityType must be one of: contact, company'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: Forbidden - feature not available or limit reached
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                statusCode: 403
                message: Maximum subscriptions limit reached for your account
        '500':
          $ref: '#/components/responses/InternalServerError'
    get:
      tags:
      - Webhooks
      summary: List Subscriptions
      description: 'Returns all webhook subscriptions for your account with pagination support.


        *Endpoint*: **(GET) https://api.lusha.com/api/subscriptions**


        **Pagination:**

        - Results are sorted by `createdAt` in descending order (newest first)

        - Default limit: 10, max limit: 100

        - Use `offset` for pagination through large result sets


        > **Note:** The webhook `secret` is never returned in list responses for security.

        '
      operationId: listSubscriptions
      parameters:
      - name: limit
        in: query
        required: false
        description: Maximum number of results (1-100)
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 10
        example: 10
      - name: offset
        in: query
        required: false
        description: Number of results to skip
        schema:
          type: integer
          minimum: 0
          default: 0
        example: 0
      responses:
        '200':
          description: List of subscriptions retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionListResponse'
              example:
                data:
                - id: 507f1f77bcf86cd799439011
                  entityType: contact
                  entityId: '123456'
                  signalTypes:
                  - promotion
                  - companyChange
                  url: https://example.com/webhook
                  name: My Contact Webhook
                  isActive: true
                  createdAt: '2024-01-01T00:00:00.000Z'
                  updatedAt: '2024-01-01T00:00:00.000Z'
                pagination:
                  total: 25
                  limit: 10
                  offset: 0
                  hasMore: true
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
    servers:
    - url: https://api.lusha.com
      description: Production server
  /api/subscriptions/{id}:
    get:
      tags:
      - Webhooks
      summary: Get Subscription by ID
      description: 'Returns a single webhook subscription by ID.


        *Endpoint*: **(GET) https://api.lusha.com/api/subscriptions/{id}**

        '
      operationId: getSubscriptionById
      parameters:
      - name: id
        in: path
        required: true
        description: Subscription ID
        schema:
          type: string
        example: 507f1f77bcf86cd799439011
      responses:
        '200':
          description: Subscription retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionWithoutSecret'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
    patch:
      tags:
      - Webhooks
      summary: Update Subscription
      description: 'Updates an existing webhook subscription. All fields are optional.


        *Endpoint*: **(PATCH) https://api.lusha.com/api/subscriptions/{id}**


        ---

        **Reactivating Disabled Subscriptions:**


        When setting `isActive: true` on a previously disabled subscription, the system automatically:

        - Clears the `blockReason` field

        - Clears the `blockedAt` timestamp

        - Resets the retry counter


        **Regenerating Secrets:**


        Set `regenerateSecret: true` to generate a new webhook secret. The new secret:

        - Affects **all subscriptions** for your account

        - Is only shown once in the response

        - Immediately invalidates the old secret

        ---

        '
      operationId: updateSubscription
      parameters:
      - name: id
        in: path
        required: true
        description: Subscription ID
        schema:
          type: string
        example: 507f1f77bcf86cd799439011
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSubscriptionRequest'
            examples:
              disableSubscription:
                summary: Disable a subscription
                value:
                  isActive: false
              updateSignals:
                summary: Change subscribed signals
                value:
                  signalTypes:
                  - promotion
                  - companyChange
              regenerateSecret:
                summary: Regenerate webhook secret
                value:
                  regenerateSecret: true
              updateUrl:
                summary: Update webhook URL
                value:
                  url: https://new-domain.com/webhooks/lusha
      responses:
        '200':
          description: Subscription updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
    servers:
    - url: https://api.lusha.com
      description: Production server
  /api/subscriptions/{id}/test:
    post:
      tags:
      - Webhooks
      summary: Test Subscription
      description: 'Test a webhook subscription by sending a test signal. Supports three test modes.


        *Endpoint*: **(POST) https://api.lusha.com/api/subscriptions/{id}/test**

        ---

        **Test Modes:**

        - `direct` - Quick HTTP check only (validates URL responds correctly)

        - `kafka` - Fanout handler only (tests Kafka message processing)

        - `full` - Complete Kafka flow (default - end-to-end test)


        **Important Notes:**

        - Test deliveries do NOT consume credits

        - Test payloads use mock data

        - Useful for verifying webhook configuration before going live

        '
      operationId: testSubscription
      parameters:
      - name: id
        in: path
        required: true
        description: Subscription ID
        schema:
          type: string
        example: 507f1f77bcf86cd799439011
      - name: mode
        in: query
        required: false
        description: Test mode
        schema:
          type: string
          enum:
          - direct
          - kafka
          - full
          default: full
        example: full
      responses:
        '200':
          description: Test executed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestSubscriptionResponse'
              example:
                subscriptionId: 507f1f77bcf86cd799439011
                subscriptionName: My Test Webhook
                url: https://example.com/webhook
                mode: full
                flowCheck:
                  success: true
                  statusCode: 200
                  durationMs: 150
                testPayload:
                  entityType: contact
                  signalType: promotion
                  data: {}
                isSuccess: true
                timestamp: '2024-01-01T00:00:00.000Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: Subscription does not belong to your account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                statusCode: 403
                message: Subscription does not belong to your account
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
    servers:
    - url: https://api.lusha.com
      description: Production server
  /api/subscriptions/delete:
    post:
      tags:
      - Webhooks
      summary: Delete Subscriptions
      description: 'Delete one or more webhook subscriptions. Returns detailed results for each deletion with partial success support.


        *Endpoint*: **(POST) https://api.lusha.com/api/subscriptions/delete**


        ---


        **Behavior:**

        - Each subscription is processed independently

        - Returns detailed results for each item including deleted subscription info

        - Invalid ID formats are gracefully handled and reported as NOT_FOUND

        - Duplicate IDs are automatically deduplicated

        - Deletion is permanent and cannot be undone

        '
      operationId: deleteSubscriptions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - ids
              properties:
                ids:
                  type: array
                  minItems: 1
                  maxItems: 25
                  items:
                    type: string
                  description: Array of subscription IDs to delete
                  example:
                  - 507f1f77bcf86cd799439011
                  - 507f1f77bcf86cd799439012
            examples:
              singleDelete:
                summary: Delete a single subscription
                value:
                  ids:
                  - sub-123
              multipleDelete:
                summary: Delete multiple subscriptions
                value:
                  ids:
                  - sub-123
                  - sub-456
                  - sub-789
      responses:
        '200':
          description: Delete operation completed (full or partial success)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteSubscriptionResponse'
              examples:
                allSuccessful:
                  summary: All subscriptions deleted successfully
                  value:
                    total: 3
                    successful: 3
                    failed: 0
                    results:
                    - index: 0
                      success: true
                      subscription:
                        id: sub-123
                        entityType: contact
                        entityId: '123'
                        name: Contact Webhook
                partialSuccess:
                  summary: Some deletions failed
                  value:
                    total: 3
                    successful: 2
                    failed: 1
                    results:
                    - index: 0
                      success: true
                      subscription:
                        id: sub-123
                        entityType: contact
                        entityId: '123'
                        name: Contact Webhook
                    - index: 1
                      success: false
                      error:
                        code: NOT_FOUND
                        message: Subscription with id 'sub-456' not found
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
    servers:
    - url: https://api.lusha.com
      description: Production server
  /api/audit-logs:
    get:
      tags:
      - Webhooks
      summary: Get Audit Logs
      description: 'Retrieve webhook delivery logs for your account.


        *Endpoint*: **(GET) https://api.lusha.com/api/audit-logs**


        **What''s Logged:**

        - All webhook delivery attempts (success and failures)

        - HTTP status codes and response times

        - Error messages for failed deliveries

        - Delivery timestamps and duration metrics


        **Filtering:**

        - Filter by subscription ID to see logs for specific subscriptions

        - Filter by status to see only successes, failures, or permanent failures


        **Rate Limit:** 100 requests/minute per account


        > **Note:** Logs are retained for 90 days (successful) and 180 days (failed/DLQ)

        '
      operationId: getAuditLogs
      parameters:
      - name: subscriptionId
        in: query
        required: false
        description: Filter by subscription ID
        schema:
          type: string
        example: 507f1f77bcf86cd799439011
      - name: status
        in: query
        required: false
        description: Filter by delivery status
        schema:
          type: string
          enum:
          - success
          - failed
          - permanent_failure
        example: success
      - name: limit
        in: query
        required: false
        description: Maximum number of results (1-100)
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 50
        example: 50
      - name: offset
        in: query
        required: false
        description: Number of results to skip
        schema:
          type: integer
          minimum: 0
          default: 0
        example: 0
      responses:
        '200':
          description: Audit logs retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditLogsResponse'
              example:
                data:
                - id: log-123
                  subscriptionId: sub-123
                  payloadId: payload-456
                  status: success
                  statusCode: 200
                  url: https://example.com/webhook
                  deliveredAt: '2024-01-01T00:00:00.000Z'
                  durationMs: 150
                  error: null
                pagination:
                  total: 100
                  limit: 50
                  offset: 0
                  hasMore: true
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
    servers:
    - url: https://api.lusha.com
      description: Production server
  /api/audit-logs/stats:
    get:
      tags:
      - Webhooks
      summary: Get Audit Log Statistics
      description: 'Get delivery statistics for your account.


        *Endpoint*: **(GET) https://api.lusha.com/api/audit-logs/stats**

        '
      operationId: getAuditLogStats
      parameters:
      - name: subscriptionId
        in: query
        required: false
        description: Filter statistics by subscription ID
        schema:
          type: string
        example: sub-123
      responses:
        '200':
          description: Statistics retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditLogStatsResponse'
              example:
                total: 1000
                success: 950
                failed: 50
                successRate: 95.00%
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
    servers:
    - url: https://api.lusha.com
      description: Production server
  /api/account/secret:
    get:
      tags:
      - Webhooks
      summary: Get Account Secret
      description: 'Retrieve the current account webhook secret.


        *Endpoint*: **(GET) https://api.lusha.com/api/account/secret**

        '
      operationId: getAccountSecret
      responses:
        '200':
          description: Account secret retrieved successfully
          content:
            application/json:
              schema:
                type: object
                required:
                - secret
                properties:
                  secret:
                    type: string
                    description: Current account webhook secret
                    example: whsec_abc123def456ghi789jkl012mno345pqr678stu901vwx234yz
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Account secret not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                statusCode: 404
                message: Account secret not found. Please generate one first.
        '500':
          $ref: '#/components/responses/InternalServerError'
    servers:
    - url: https://api.lusha.com
      description: Production server
  /api/account/secret/regenerate:
    post:
      tags:
      - Webhooks
      summary: Regenerate Account Secret
      description: 'Regenerate the account webhook secret. Affects **all subscriptions** for the account.


        *Endpoint*: **(POST) https://api.lusha.com/api/account/secret/regenerate**


        **Behavior:**

        - If a secret already exists: Replaces with new secret (old secret is invalidated)

        - If no secret exists: Creates new secret automatically


        **Important Notes:**

        - The secret is only shown once in the response. Store it securely.

        - This endp

# --- truncated at 32 KB (57 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/lusha/refs/heads/main/openapi/lusha-webhooks-api-openapi.yml