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

# Send a Test Event

> Send one signed test event to your endpoint now.

The request is signed with your venue's secret, sent once and not retried. See [Events](https://api-docs.nowbookit.com/platform/webhooks/events.md) for the test event's body.

You can send one test per webhook every 10 seconds. Another one sooner returns `429`.


## OpenAPI

````yaml platform/webhooks/openapi.json POST /venue/{venueId}/webhooks/{receiverId}/test
openapi: 3.0.4
info:
  title: NowBookIt Webhooks API
  description: >-
    Manage the webhooks that send a venue's booking and gift card events to your
    system.
  version: v1
  contact:
    email: platform.integrations@nowbookit.com
servers:
  - url: https://platform.uat.nowbookit.com/api/comms
    description: UAT
  - url: https://platform.nowbookit.com/api/comms
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Webhooks
    description: Webhook management.
paths:
  /venue/{venueId}/webhooks/{receiverId}/test:
    parameters:
      - name: venueId
        in: path
        required: true
        schema:
          type: string
        description: Your venue's id. Must be the venue your API key belongs to.
        example: '6319'
      - name: receiverId
        in: path
        required: true
        schema:
          type: string
        description: The webhook's id, from `receiverId` on the webhook.
        example: 3f2b8c1e-6d4a-4f1b-9a7e-2c5d8e9f0a1b
    post:
      tags:
        - Webhooks
      summary: Send a test event
      description: >-
        Sends one signed `webhook.test` event to one of the webhook's URLs now,
        and returns your endpoint's answer. It is not retried.
      operationId: sendWebhookTest
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestEventRequest'
            example:
              url: https://example.com/nowbookit
      responses:
        '200':
          description: Your endpoint's answer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestEventResponse'
              example:
                result:
                  kind: response
                  status: 200
                  latencyMs: 184
        '400':
          description: The request failed validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
              example:
                code: ValidationError
                message: Request body failed validation
                requestId: 8f14e45f-ceea-4c6f-8f89-example
                errors:
                  url:
                    - 'Invalid input: expected string, received undefined'
        '401':
          description: Invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: UnauthorisedError
                message: Invalid API key
                requestId: 8f14e45f-ceea-4c6f-8f89-example
        '403':
          description: Only an API key for this venue can manage its webhooks.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: AppError
                message: Only an API key for this venue can manage its webhooks.
                requestId: 8f14e45f-ceea-4c6f-8f89-example
        '404':
          description: >-
            This webhook doesn't send to that URL. Also returned when webhooks
            aren't switched on for this organisation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: AppError
                message: This webhook doesn't send to that URL.
                requestId: 8f14e45f-ceea-4c6f-8f89-example
        '429':
          description: >-
            A test event was just sent to this webhook. Wait a few seconds and
            try again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: AppError
                message: >-
                  A test event was just sent to this webhook. Wait a few seconds
                  and try again.
                requestId: 8f14e45f-ceea-4c6f-8f89-example
components:
  schemas:
    TestEventRequest:
      type: object
      additionalProperties: false
      properties:
        url:
          type: string
          description: One of the webhook's endpoint URLs.
      required:
        - url
    TestEventResponse:
      type: object
      properties:
        result:
          type: object
          description: >-
            `kind` is `response` when your endpoint answered (any status), or
            `failed` when it didn't, with the `reason`.
          properties:
            kind:
              type: string
              enum:
                - response
                - failed
            status:
              type: integer
              description: '`response` only: your endpoint''s HTTP status.'
            reason:
              type: string
              description: '`failed` only: why no answer came back, such as a timeout.'
            latencyMs:
              type: integer
              description: How long the request took.
          required:
            - kind
            - latencyMs
      required:
        - result
    ValidationErrorResponse:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
        - type: object
          properties:
            errors:
              type: object
              description: Per-field validation messages, keyed by field.
              additionalProperties:
                type: array
                items:
                  type: string
          required:
            - errors
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
          description: >-
            Error class name, e.g. `UnauthorisedError`, `ValidationError`,
            `AppError`.
          example: AppError
        message:
          type: string
          description: What went wrong, described in plain language.
          example: No webhook with that id at this venue.
        requestId:
          type: string
          description: >-
            A unique reference for this request, handy if you contact support
            about it.
          example: 8f14e45f-ceea-4c6f-8f89-example
      required:
        - code
        - message
        - requestId
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: >-
        Your API key, with the `webhooks:manage` permission. See
        [Authorization](/platform/authorization).

````

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