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

# Update Webhook Configuration

> Set or clear webhook URL and/or custom field names. Partial update supported; URL must use HTTPS.

## Overview

Configure or clear the webhook URL and optional `field_names` allowlist. Omit fields to leave them unchanged. Use `url: null` or empty string to clear the webhook. Single lookups can send `webhook_custom_fields` in `POST /incentives`; batch items support `webhook_custom_fields` per item.


## OpenAPI

````yaml PUT /webhook-config
openapi: 3.0.3
info:
  title: Leap Energy API
  description: >-
    The Leap Energy API provides a unified interface for managing rebate
    incentives and applications.


    ## Incentives API

    Search for and calculate incentive amounts across multiple utility programs.
    Given a customer

    address and building type, the API identifies applicable utility programs
    and calculates potential

    incentive amounts for various device and tier combinations. When your
    organization has a webhook URL

    configured (Webhook Config API), each successful lookup triggers a POST to
    your URL with the response

    and optional custom fields (`webhook_custom_fields`).


    ## Applications API

    Manage rebate applications on behalf of customers. Applications represent a
    customer's request

    for a rebate under a specific utility program, including customer
    information, device details,

    and application metadata.
  version: 2.0.0
  contact:
    name: Leap Energy
    url: https://leap.energy
servers:
  - url: https://api.incentives.leap.energy/alpha
    description: Production API
security:
  - ApiKeyAuth: []
  - BearerAuth: []
paths:
  /webhook-config:
    put:
      summary: Update webhook configuration
      description: >-
        Set or clear webhook URL and/or field names. Partial update: omit fields
        to leave them unchanged. Use `url: null` or empty string to clear. URL
        must use HTTPS.
      operationId: putWebhookConfig
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookConfigUpdate'
      responses:
        '200':
          description: Config updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookConfig'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookError'
        '401':
          description: Unauthorized
        '500':
          description: Failed to save webhook config
components:
  schemas:
    WebhookConfigUpdate:
      type: object
      description: Partial update; all fields optional.
      properties:
        url:
          type: string
          format: uri
          nullable: true
          description: Set webhook URL (HTTPS required). Use null or empty to clear.
        field_names:
          type: array
          items:
            type: string
    WebhookConfig:
      type: object
      description: Current webhook configuration for the authenticated organization
      properties:
        url:
          type: string
          format: uri
          nullable: true
          description: Webhook URL; POST is sent here after each successful lookup.
        field_names:
          type: array
          items:
            type: string
          example:
            - Project ID
            - Record ID
    WebhookError:
      type: object
      properties:
        error:
          type: string
          description: Error message (e.g. Webhook URL must use HTTPS, Invalid URL format)
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >
        API key for authentication. Include your Leap API key in the `x-api-key`
        header: `x-api-key: leap_live_...`
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Clerk JWT token for portal authentication

````