> ## 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.

# Send a Test Event to a Webhook

> Sends a `webhook.test` event to the webhook straight away, whether or not it is on, and reports how the endpoint answered. Responds 200 either way: `delivered` says whether the endpoint accepted it. Takes up to 20 seconds when the endpoint is slow. The result is not recorded against the webhook.



## OpenAPI

````yaml https://manage.nervescloud.com/api/openapi post /api/orgs/{org_name}/webhooks/{id}/test
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}/test:
    post:
      tags:
        - Webhooks
      summary: Send a Test Event to a Webhook
      description: >-
        Sends a `webhook.test` event to the webhook straight away, whether or
        not it is on, and reports how the endpoint answered. Responds 200 either
        way: `delivered` says whether the endpoint accepted it. Takes up to 20
        seconds when the endpoint is slow. The result is not recorded against
        the webhook.
      operationId: NervesHubWeb.API.WebhookController.send_test
      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
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookTestResponse'
          description: Webhook test 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
      callbacks: {}
      security:
        - bearer_auth: []
components:
  schemas:
    WebhookTestResponse:
      description: How the webhook's endpoint answered a `webhook.test` event
      example:
        data:
          delivered: false
          error: HTTP 500
          status: 500
      properties:
        data:
          properties:
            delivered:
              description: Whether the endpoint answered with a 2xx status
              type: boolean
            error:
              description: Why the delivery failed, if it did
              nullable: true
              type: string
            status:
              description: >-
                The endpoint's response status, or null when there was no
                response
              nullable: true
              type: integer
          type: object
      title: WebhookTestResponse
      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
  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.