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

# Update webhook

> Replace a webhook endpoint's configuration.

## Use Case:

Update a registered webhook endpoint — change its URL, subscribed events, or signing secret. Use `PATCH` for partial updates.


## OpenAPI

````yaml put /api/v1/webhooks/{id}/
openapi: 3.0.3
info:
  title: Generect API
  description: >-
    Welcome to the Generect API documentation. Here we will help you integrate
    and use our API.


    API base url: `https://api.generect.com` — every path below is relative to
    this host. Newer endpoints live under `/api/v1/...`, legacy endpoints under
    `/api/...`; use each path exactly as documented.

    Protocol: `HTTPS`


    # Authentication


    Get your API token from the Generect app settings and send it in the
    `Authorization` header with the required `Token` prefix.


    Example: `Authorization: Token xxxxxxxxx`


    # Rate limits


    You can request data depending on your data plan and account balance
    (default: 10000/month). Pricing depends on the operation and the number of
    results returned, and may increase with additional data flags. For exact
    pricing, see each endpoint's Pricing section or your billing settings:
    https://beta.generect.com/settings/billing


    # Note


    _Every endpoint must include the trailing `/`. Requests without the trailing
    slash may fail._
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.generect.com
security:
  - apiKey: []
tags:
  - name: 1. Auth
    description: Login and get user info
  - name: 2. Transactions
    description: List of latest transactions in your account
  - name: 3. Leads
    description: Fetch information about leads by _link/name/ICP_.
  - name: 4. Companies
    description: Fetch information about companies by link/name/ICP.
  - name: 5. Preview
    description: Search masked database leads for preview and reveal workflows.
  - name: 6. Enrich
    description: Enrich leads and companies by internal or external identifiers.
  - name: 7. Email
    description: Find and validate email addresses.
  - name: 8. Accounts
    description: Account profile, usage, and transactions.
  - name: 9. Search
    description: Database and realtime lead, company, and company-lead search.
  - name: 10. Phone
    description: Find phone numbers for leads.
  - name: 11. Webhooks
    description: Register and manage async job notifications.
paths:
  /api/v1/webhooks/{id}/:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
        example: wh_123
    put:
      tags:
        - 11. Webhooks
      summary: Update webhook
      description: Replace a webhook endpoint's configuration.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - url
                - events
              properties:
                url:
                  type: string
                  example: https://your-app.com/webhook
                events:
                  type: array
                  items:
                    type: string
                    enum:
                      - email.find.bulk.completed
                      - phone.find.bulk.completed
                      - enrich.lead.bulk.completed
                      - enrich.company.bulk.completed
                secret:
                  type: string
      responses:
        '200':
          description: Webhook updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '400':
          description: Validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Validation error:
                  value:
                    status: error
                    status_code: 400
                    detail:
                      events:
                        - >-
                          Unsupported events: ['email.find.completed']. Allowed:
                          ['email.find.bulk.completed',
                          'enrich.company.bulk.completed',
                          'enrich.lead.bulk.completed',
                          'phone.find.bulk.completed']
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    Webhook:
      type: object
      properties:
        id:
          type: string
          description: Webhook identifier.
        url:
          type: string
          description: Your HTTPS endpoint that receives events.
        events:
          type: array
          items:
            type: string
          description: Subscribed event types.
        secret:
          type: string
          description: Secret used for HMAC signature verification.
        is_active:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      description: Standard error envelope returned for 4xx/5xx responses.
      properties:
        status:
          type: string
          example: error
        status_code:
          type: integer
          example: 400
        detail:
          description: >-
            Human-readable message (string) for most errors, or a field-level
            validation map ({ field: [messages] }) for 400 validation errors.
          example: Insufficient funds in the account.
  responses:
    Unauthorized:
      description: Missing or invalid API token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            status: error
            status_code: 401
            detail: Authentication credentials were not provided.
    Forbidden:
      description: Authenticated, but the account/plan is not allowed to use this endpoint.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            status: error
            status_code: 403
            detail: You do not have permission to perform this action.
    NotFound:
      description: Resource or job not found (or not owned by the caller).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            status: error
            status_code: 404
            detail: Not found.
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Authorization
      description: 'Use the required Token prefix. Example: Authorization: Token xxxxxxxxx'

````