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

# Test Webhook

> Send a signed sample payload to a Novacal webhook URL and see at once if your endpoint received it.

## What this endpoint is for

Use this endpoint to check your webhook URL without a real booking. Novacal sends a sample payload to your URL at once and tells you the result.

## The sample payload

The payload has the same shape and the same headers as a real delivery. It is signed with your webhook `secret`, so you can also test your signature check.

The payload has `"test": true` and uses sample data, for example `Sample Meeting` and `alex@example.com`. Use the `test` field to ignore test deliveries in your own system.

By default, the event is `event.created`. Send `event` in the body to test a different event, for example `event.canceled`.

## The result

| Field | Description |
| - | - |
| `delivered` | `true` if your endpoint replied with a `2xx` status code |
| `status_code` | The status code of your endpoint, or `null` if Novacal could not connect |
| `duration_ms` | How long the request took, in milliseconds |
| `error` | Why the delivery failed, or `null` |

A failed test still returns `200`. Check `delivered` to see the result.

## Limits

* A test is sent one time. There are no retries.
* A test also works for a webhook that is not active.
* You can only test webhooks on your own account. Another account's webhook returns `403 access_denied`.


## OpenAPI

````yaml POST /v1/webhooks/{id}/test
openapi: 3.1.0
info:
  title: Events API
  description: Public API for managing event types
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.novacal.io
security:
  - bearerAuth: []
paths:
  /v1/webhooks/{id}/test:
    post:
      description: >-
        Sends a sample payload to the webhook URL at once, so you can check that
        your endpoint receives and verifies it. The payload is signed like a
        real delivery and has `"test": true`. There are no retries. This also
        works for a webhook that is not active.
      parameters:
        - name: id
          in: path
          description: ID of the webhook to test
          required: true
          schema:
            type: integer
      requestBody:
        description: Event to send. If you do not send it, `event.created` is used.
        content:
          application/json:
            schema:
              type: object
              properties:
                event:
                  type: string
                  enum:
                    - event.created
                    - event.rescheduled
                    - event.canceled
                    - event.started
                    - event.ended
                  description: The event name to put in the sample payload
        required: false
      responses:
        '200':
          description: >-
            The result of the test delivery. A failed delivery also returns 200,
            with `delivered` set to `false`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    properties:
                      event:
                        type: string
                        description: The event name that was sent
                      delivered:
                        type: boolean
                        description: Whether your endpoint replied with a 2xx status code
                      status_code:
                        type:
                          - integer
                          - 'null'
                        description: >-
                          The HTTP status code of your endpoint, or null if
                          Novacal could not connect
                      duration_ms:
                        type: integer
                        description: How long the request took, in milliseconds
                      error:
                        type:
                          - string
                          - 'null'
                        description: Why the delivery failed, or null if it was delivered
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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