> ## Documentation Index
> Fetch the complete documentation index at: https://docs.leadpipe.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create webhook endpoint

> Create a webhook endpoint for future visitor identifications matching optional segment and pixel filters. Omit both filters to receive all organization identifications. emailGrades defaults to null (all emails, including unknown grades); select one or more of A valid, B catchall, C risky and D invalid to send only those contact addresses. A visitor with no selected address is skipped without consuming a first-match claim. The URL must use HTTPS and cannot target private networks. The signing secret is returned only on creation; delivery is asynchronous. Repeating creation creates another endpoint. Requires an organization API key with visitor Data API access. All webhook operations share 30 requests per 60 seconds per source IP. Dedicated admin API credentials also authorize platform-wide management, including white-label targets; customer bearer/API-key restrictions described above remain unchanged. Existing resource validation and business-state rules still apply.



## OpenAPI

````yaml https://api.aws53.cloud/openapi-data.json post /v1/data/webhooks
openapi: 3.1.0
info:
  title: Identification API
  version: 1.0.0
  description: >-
    Query visitor data and manage tracking pixels and outbound visitor webhooks.
    Authenticate with your API key (X-API-Key header).
servers:
  - url: https://api.aws53.cloud
    description: Production
security:
  - apiKeyAuth: []
tags:
  - name: Visitors
    description: Visitor resources and privacy-bounded activity.
  - name: Pixels
    description: Tracking pixel installation and configuration.
  - name: Account
    description: Organization account health and API entitlements.
  - name: Visitor Suppression
    description: Organization visitor suppression rules.
  - name: Webhooks
    description: Webhook destinations, deliveries, and provider callbacks.
  - name: Usage
    description: Organization usage and billing-period consumption.
paths:
  /v1/data/webhooks:
    post:
      tags:
        - Webhooks
      summary: Create webhook endpoint
      description: >-
        Create a webhook endpoint for future visitor identifications matching
        optional segment and pixel filters. Omit both filters to receive all
        organization identifications. emailGrades defaults to null (all emails,
        including unknown grades); select one or more of A valid, B catchall, C
        risky and D invalid to send only those contact addresses. A visitor with
        no selected address is skipped without consuming a first-match claim.
        The URL must use HTTPS and cannot target private networks. The signing
        secret is returned only on creation; delivery is asynchronous. Repeating
        creation creates another endpoint. Requires an organization API key with
        visitor Data API access. All webhook operations share 30 requests per 60
        seconds per source IP. Dedicated admin API credentials also authorize
        platform-wide management, including white-label targets; customer
        bearer/API-key restrictions described above remain unchanged. Existing
        resource validation and business-state rules still apply.
      operationId: createDataWebhook
      parameters:
        - name: X-Whitelabel-Slug
          in: header
          required: false
          description: >-
            Optional tenant context for admin-key operations without an
            organization target, such as creating an organization. Defaults to
            the master tenant. Must match an explicit target organization when
            both are supplied. Does not limit the key’s platform authority.
          schema:
            type: string
            minLength: 1
            maxLength: 100
          example: agency-test
        - name: X-Organization-Id
          in: header
          required: false
          description: >-
            Target organization for admin-key requests on organization-context
            routes, including Data API, intent audiences and dashboard routes
            without an organization path parameter. Required on those routes.
            When supplied with an organization path parameter, both must
            identify the same organization; conflicting targets return 400. Does
            not grant access to customer credentials.
          schema:
            type: string
            format: uuid
          example: 11111111-1111-4111-8111-111111111111
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                emailGrades:
                  type:
                    - array
                    - 'null'
                  items:
                    type: string
                    enum:
                      - A
                      - B
                      - C
                      - D
                  minItems: 1
                  maxItems: 4
                  description: >-
                    null sends all emails, including unknown grades. Otherwise
                    select one or more grades (A valid, B catchall, C risky, D
                    invalid). Only selected addresses are sent; a visitor with
                    no selected address is skipped.
                url:
                  type: string
                  format: uri
                  description: HTTPS endpoint URL
                signaturesEnabled:
                  type: boolean
                  default: true
                  description: 'Whether to include HMAC signatures (default: true)'
                triggerMode:
                  type: string
                  enum:
                    - first_match
                    - every_update
                  default: first_match
                  description: >-
                    first_match: Send once per visitor (CRM). every_update: Send
                    on every session (analytics)
                segmentId:
                  type: string
                  format: uuid
                  description: >-
                    Optional segment filter - if omitted, matches all visitors
                    in organization
                pixelId:
                  type: string
                  format: uuid
                  description: Optional pixel filter - if omitted, matches all pixels
                maxRequestsPerSecond:
                  type: integer
                  minimum: 1
                  maximum: 100
                  default: 5
                maxRetries:
                  type: integer
                  minimum: 0
                  maximum: 10
                  default: 3
              required:
                - url
              example:
                url: https://receiver.example.test/webhooks/identifications
                triggerMode: first_match
                segmentId: 550e8400-e29b-41d4-a716-446655440001
                pixelId: 550e8400-e29b-41d4-a716-446655440002
                maxRequestsPerSecond: 5
                maxRetries: 3
            example:
              url: https://receiver.example.test/visitors
              triggerMode: first_match
              signaturesEnabled: true
              maxRequestsPerSecond: 5
              maxRetries: 3
      responses:
        '201':
          description: Organization webhook created
          headers:
            RateLimit-Limit:
              description: Requests allowed per 60 seconds.
              schema:
                type: integer
            RateLimit-Remaining:
              description: Requests remaining in the window.
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until the window resets.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookCreationResponse'
              example:
                id: 11111111-1111-4111-8111-111111111111
                segmentId: null
                segmentName: null
                url: https://receiver.example.test/visitors
                signaturesEnabled: true
                triggerMode: first_match
                pixelId: null
                pixelName: null
                isActive: true
                maxRequestsPerSecond: 5
                maxRetries: 3
                stats:
                  totalDeliveries: 0
                  successfulDeliveries: 0
                  failedDeliveries: 0
                  successRate: 100
                  lastDeliveredAt: null
                  lastFailureAt: null
                  lastFailureReason: null
                createdAt: '2026-01-15T10:00:00Z'
                updatedAt: '2026-01-15T10:00:00Z'
                secret: >-
                  whsec_synthetic_documentation_only_00000000000000000000000000000000
        '400':
          description: Invalid webhook request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details: {}
                    required:
                      - code
                      - message
                  meta:
                    type: object
                    properties:
                      timestamp:
                        type: string
                        format: date-time
                      request_id:
                        type: string
                    required:
                      - timestamp
                      - request_id
                required:
                  - error
                  - meta
              example:
                error:
                  code: VALIDATION_ERROR
                  message: Invalid webhook request
                meta:
                  timestamp: '2026-01-15T10:00:00Z'
                  request_id: 11111111-1111-4111-8111-111111111111
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details: {}
                    required:
                      - code
                      - message
                  meta:
                    type: object
                    properties:
                      timestamp:
                        type: string
                        format: date-time
                      request_id:
                        type: string
                    required:
                      - timestamp
                      - request_id
                required:
                  - error
                  - meta
              example:
                error:
                  code: HTTP_ERROR
                  message: Missing or invalid API key
                meta:
                  timestamp: '2026-01-15T10:00:00Z'
                  request_id: 11111111-1111-4111-8111-111111111111
        '403':
          description: API key revoked or organization lacks visitor Data API access
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details: {}
                    required:
                      - code
                      - message
                  meta:
                    type: object
                    properties:
                      timestamp:
                        type: string
                        format: date-time
                      request_id:
                        type: string
                    required:
                      - timestamp
                      - request_id
                required:
                  - error
                  - meta
              example:
                error:
                  code: HTTP_ERROR
                  message: >-
                    API key revoked or organization lacks visitor Data API
                    access
                meta:
                  timestamp: '2026-01-15T10:00:00Z'
                  request_id: 11111111-1111-4111-8111-111111111111
        '404':
          description: Webhook or filter not found in this organization
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details: {}
                    required:
                      - code
                      - message
                  meta:
                    type: object
                    properties:
                      timestamp:
                        type: string
                        format: date-time
                      request_id:
                        type: string
                    required:
                      - timestamp
                      - request_id
                required:
                  - error
                  - meta
              example:
                error:
                  code: HTTP_ERROR
                  message: Webhook or filter not found in this organization
                meta:
                  timestamp: '2026-01-15T10:00:00Z'
                  request_id: 11111111-1111-4111-8111-111111111111
        '429':
          description: Too many requests, please try again later
          headers:
            RateLimit-Limit:
              description: Requests allowed per 60 seconds.
              schema:
                type: integer
            RateLimit-Remaining:
              description: Requests remaining in the window.
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until the window resets.
              schema:
                type: integer
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details: {}
                    required:
                      - code
                      - message
                  meta:
                    type: object
                    properties:
                      timestamp:
                        type: string
                        format: date-time
                      request_id:
                        type: string
                    required:
                      - timestamp
                      - request_id
                required:
                  - error
                  - meta
              example:
                error:
                  code: RATE_LIMIT_EXCEEDED
                  message: Too many requests, please try again later
                meta:
                  timestamp: '2026-01-15T10:00:00Z'
                  request_id: 11111111-1111-4111-8111-111111111111
      security:
        - apiKeyAuth: []
        - adminApiKeyAuth: []
components:
  schemas:
    WebhookCreationResponse:
      allOf:
        - $ref: '#/components/schemas/WebhookEndpoint'
        - type: object
          properties:
            secret:
              type: string
              description: >-
                🔐 Secret for HMAC signature verification (whsec_...) - SHOWN
                ONLY ONCE on creation, store it securely!
          required:
            - secret
      description: Webhook creation response with secret (shown only once)
      example:
        id: 550e8400-e29b-41d4-a716-446655440000
        segmentId: 550e8400-e29b-41d4-a716-446655440001
        segmentName: High-Intent Enterprise Visitors
        url: https://receiver.example.test/webhooks/identifications
        secret: whsec_synthetic_documentation_only_00000000000000000000000000000000
        signaturesEnabled: true
        triggerMode: first_match
        pixelId: 550e8400-e29b-41d4-a716-446655440002
        pixelName: Main Website
        isActive: true
        maxRequestsPerSecond: 5
        maxRetries: 3
        stats:
          totalDeliveries: 0
          successfulDeliveries: 0
          failedDeliveries: 0
          successRate: 100
          lastDeliveredAt: null
          lastFailureAt: null
          lastFailureReason: null
        createdAt: '2025-11-07T10:00:00Z'
        updatedAt: '2025-11-07T10:00:00Z'
    WebhookEndpoint:
      type: object
      properties:
        emailGrades:
          type:
            - array
            - 'null'
          items:
            type: string
            enum:
              - A
              - B
              - C
              - D
          minItems: 1
          maxItems: 4
          description: >-
            null sends all emails, including unknown grades. Otherwise select
            one or more grades (A valid, B catchall, C risky, D invalid). Only
            selected addresses are sent; a visitor with no selected address is
            skipped.
        id:
          type: string
          format: uuid
        segmentId:
          type:
            - string
            - 'null'
          format: uuid
        segmentName:
          type:
            - string
            - 'null'
        url:
          type: string
          format: uri
        signaturesEnabled:
          type: boolean
          description: Whether to include HMAC signature header in webhook requests
        triggerMode:
          type: string
          enum:
            - first_match
            - every_update
          description: Delivery mode
        pixelId:
          type:
            - string
            - 'null'
          format: uuid
          description: Optional pixel filter - if null, matches all pixels
        pixelName:
          type:
            - string
            - 'null'
        isActive:
          type: boolean
        maxRequestsPerSecond:
          type: integer
          minimum: 1
          maximum: 100
        maxRetries:
          type: integer
          minimum: 0
          maximum: 10
        stats:
          type: object
          properties:
            totalDeliveries:
              type: integer
            successfulDeliveries:
              type: integer
            failedDeliveries:
              type: integer
            successRate:
              type: number
            lastDeliveredAt:
              type:
                - string
                - 'null'
            lastFailureAt:
              type:
                - string
                - 'null'
            lastFailureReason:
              type:
                - string
                - 'null'
          required:
            - totalDeliveries
            - successfulDeliveries
            - failedDeliveries
            - successRate
            - lastDeliveredAt
            - lastFailureAt
            - lastFailureReason
        createdAt:
          type: string
        updatedAt:
          type: string
      required:
        - id
        - segmentId
        - segmentName
        - url
        - signaturesEnabled
        - triggerMode
        - pixelId
        - pixelName
        - isActive
        - maxRequestsPerSecond
        - maxRetries
        - stats
        - createdAt
        - updatedAt
      description: Webhook endpoint configuration (secret not included)
      example:
        id: 550e8400-e29b-41d4-a716-446655440000
        segmentId: 550e8400-e29b-41d4-a716-446655440001
        segmentName: High-Intent Enterprise Visitors
        url: https://receiver.example.test/webhooks/identifications
        signaturesEnabled: true
        triggerMode: first_match
        pixelId: 550e8400-e29b-41d4-a716-446655440002
        pixelName: Main Website
        isActive: true
        maxRequestsPerSecond: 5
        maxRetries: 3
        stats:
          totalDeliveries: 1250
          successfulDeliveries: 1247
          failedDeliveries: 3
          successRate: 99.76
          lastDeliveredAt: '2025-11-07T10:30:00Z'
          lastFailureAt: '2025-11-06T14:22:00Z'
          lastFailureReason: Connection timeout
        createdAt: '2025-10-01T10:00:00Z'
        updatedAt: '2025-11-07T10:00:00Z'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Organization API key (sk_...). Get yours from Settings > API Keys in the
        dashboard.
    adminApiKeyAuth:
      type: apiKey
      in: header
      name: X-Admin-API-Key
      description: >-
        Dedicated full-access management credential, issued to an active
        master-superadmin actor. Never a customer organization API key. Use one
        credential per request. Admin-header requests are limited to 600 per 60
        seconds per source IP per process, in addition to existing route limits;
        429 responses emit Retry-After and RateLimit-Limit/Remaining/Reset.
        Organization-scoped operations require X-Organization-Id where no target
        organization is in the path.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.