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

# Update a Webhook

> Changes a webhook's URL, description, events, products, or whether it is on. The signing secret is not changed.



## OpenAPI

````yaml https://manage.nervescloud.com/api/openapi put /api/orgs/{org_name}/webhooks/{id}
openapi: 3.0.0
info:
  description: >
    The NervesCloud API gives users full access to their

    Orgs, Products, and corresponding Device fleets.


    The API can be used to integrate with your own systems, providing full
    access to your Product and Device data.


    The API is documented using the OpenAPI 3.0 specification.
  title: NervesCloud API
  version: 2.0.0
servers:
  - url: https://manage.nervescloud.com
    variables: {}
security:
  - bearer_auth: []
tags:
  - description: Archive uploading and downloading
    name: Archives
  - description: User authentication and API token creation
    name: Auth
  - description: Organization Certificate Authority management
    name: CA Certificates
  - description: >-
      Device management, including action requests eg. upgrade, reboot,
      reconnect
    name: Devices
  - description: Log lines Devices have sent over the logging extension
    name: Device Logs
  - description: Metric history Devices have reported over the health or metrics extension
    name: Device Metrics
  - description: >-
      Device management, including action requests eg. upgrade, reboot,
      reconnect
    name: Devices (short URL)
  - description: Device Certificate management
    name: Device Certificates
  - description: Keys and secrets a Device can connect with instead of a certificate
    name: Device Shared Secrets
  - description: Identities a Device holds on networks NervesHub does not run
    name: Network Identities
  - description: Deployment Group and release management
    name: Deployment Groups
  - description: Firmware uploading and management
    name: Firmwares
  - description: Organization iroh endpoint id registration
    name: Iroh Endpoints
  - description: Organization management
    name: Organizations
  - description: Organization User membership management
    name: Organization Members
  - description: Product management
    name: Products
  - description: Organization Signing Key management
    name: Signing Keys
  - description: Product Support Script management
    name: Support Scripts
  - description: Endpoints an Organization sends its Products' Device events to
    name: Webhooks
  - description: Platform healthcheck
    name: Platform Status
paths:
  /api/orgs/{org_name}/webhooks/{id}:
    put:
      tags:
        - Webhooks
      summary: Update a Webhook
      description: >-
        Changes a webhook's URL, description, events, products, or whether it is
        on. The signing secret is not changed.
      operationId: NervesHubWeb.API.WebhookController.update
      parameters:
        - description: Organization Name
          example: example_org
          in: path
          name: org_name
          required: true
          schema:
            type: string
        - description: Webhook ID
          example: 12
          in: path
          name: id
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookUpdateRequest'
        description: Webhook update request body
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
          description: Webhook response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChangesetErrorResponse'
          description: Unprocessable Entity
      callbacks: {}
      security:
        - bearer_auth: []
components:
  schemas:
    WebhookUpdateRequest:
      description: >-
        PUT/PATCH body for changing a webhook. Omitted fields are left as they
        are. Turning a webhook on clears what failed deliveries recorded about
        it.
      example:
        all_products: true
        enabled: true
        events:
          - device.connected
      properties:
        all_products:
          description: >-
            Send every product's events. Given `products` without this, it is
            taken as false.
          type: boolean
        description:
          type: string
        enabled:
          type: boolean
        events:
          items:
            enum:
              - device.connected
              - device.disconnected
              - device.health_reported
              - device.metrics_reported
              - device.health_status_changed
              - device.firmware_update.scheduled
              - device.firmware_update.progress
              - device.firmware_update.finished
              - device.firmware_validated
              - error_group.created
              - error_group.reopened
              - deployment_group.workflow_step.started
              - deployment_group.workflow_step.awaiting_approval
              - deployment_group.workflow_step.completed
              - deployment_group.workflow_step.failed
              - deployment_group.workflow_step.skipped
            type: string
          type: array
        products:
          description: >-
            The names of the products whose events to send, replacing the
            current list
          items:
            type: string
          type: array
        url:
          type: string
      title: WebhookUpdateRequest
      type: object
    WebhookResponse:
      description: A webhook
      properties:
        data:
          $ref: '#/components/schemas/Webhook'
      title: WebhookResponse
      type: object
    ErrorResponse:
      description: Error response
      example:
        errors:
          detail: Resource Not Found or Authorization Insufficient
      properties:
        errors:
          properties:
            detail:
              type: string
          type: object
      title: ErrorResponse
      type: object
    ChangesetErrorResponse:
      description: Validation error response
      example:
        errors:
          identifier:
            - can't be blank
      properties:
        errors:
          additionalProperties:
            items:
              type: string
            type: array
          type: object
      title: ChangesetErrorResponse
      type: object
    Webhook:
      description: An organization webhook, without its signing secret
      example:
        all_products: false
        description: Fleet dashboard
        disabled_reason: null
        enabled: true
        events:
          - device.connected
          - device.disconnected
        failing_since: null
        id: 12
        inserted_at: '2026-10-13T09:00:00'
        last_error: null
        last_error_at: null
        products:
          - thermostat
        updated_at: '2026-10-13T09:00:00'
        url: https://hooks.example.com/nerves-hub
      properties:
        all_products:
          description: >-
            Whether the webhook sends the events of every product in the
            organization, including products added later
          type: boolean
        description:
          description: What receives these events
          nullable: true
          type: string
        disabled_reason:
          description: >-
            Why NervesHub turned the webhook off, if it did. Cleared when it is
            turned back on.
          nullable: true
          type: string
        enabled:
          description: Whether events are being sent
          type: boolean
        events:
          description: The event types delivered to this webhook
          items:
            enum:
              - device.connected
              - device.disconnected
              - device.health_reported
              - device.metrics_reported
              - device.health_status_changed
              - device.firmware_update.scheduled
              - device.firmware_update.progress
              - device.firmware_update.finished
              - device.firmware_validated
              - error_group.created
              - error_group.reopened
              - deployment_group.workflow_step.started
              - deployment_group.workflow_step.awaiting_approval
              - deployment_group.workflow_step.completed
              - deployment_group.workflow_step.failed
              - deployment_group.workflow_step.skipped
            type: string
          type: array
        failing_since:
          description: >-
            When deliveries started failing, or null while the endpoint is
            accepting them
          format: date-time
          nullable: true
          type: string
        id:
          type: integer
        inserted_at:
          description: >-
            When it was created, in UTC. Written without an offset, such as
            `2026-01-15T09:34:27`, so not an RFC 3339 `date-time`.
          type: string
        last_error:
          description: The most recent delivery failure
          nullable: true
          type: string
        last_error_at:
          format: date-time
          nullable: true
          type: string
        products:
          description: >-
            The names of the products whose events are sent, when `all_products`
            is false
          items:
            type: string
          type: array
        updated_at:
          description: >-
            When it was last changed, in UTC. Written without an offset, such as
            `2026-01-15T09:34:27`, so not an RFC 3339 `date-time`.
          type: string
        url:
          description: Where events are sent
          type: string
      title: Webhook
      type: object
  securitySchemes:
    bearer_auth:
      description: >
        A user API token, or a product API key created in a product's settings.


        A product API key only works on the routes for its own product, under

        `/api/orgs/{org_name}/products/{product_name}`, and on
        `/api/devices/{identifier}`

        for that product's devices. What it may do there is decided by the role
        it

        holds, the same way a member's role decides what they may do.
      scheme: bearer
      type: http

````

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