# Send test event

> **POST** `https://api.us.nylas.com/v3/webhooks/send-test-event`

Source: https://developer.nylas.com/docs/reference/api/webhook-notifications/send_test_event/

Use this endpoint to check if your project's webhook destination is configured correctly. Nylas
sends a test webhook payload to the webhook URL you specify, and listens for a success
acknowledgement.

The secret used is `mock-webhook-secret`.

**Authentication:** NYLAS_API_KEY

## Request body

Destination definition

Content-Type: application/json

- `trigger_type` (string) **(required)** - Select the type of event that will trigger the webhook. See the
[notification schemas](/docs/reference/notifications/) for details about each
trigger type.

See the [Grants](/docs/reference/api/manage-grants/), [Calendar](/docs/reference/api/calendar/),
[Events](/docs/reference/api/events/), and [Messages](/docs/reference/api/messages/) references
for information on how to trigger each event type.

You can test `message.created.truncated` and `message.updated.truncated` notifications using this
endpoint. For more information, see
[Truncated webhooks](/docs/v3/notifications/#truncated-webhooks).
- `webhook_url` (string) **(required)** - The URL to send webhooks to.

## Responses

### 200 - Returns the mock payload for corresponding trigger type.

- `data` (string) - Indicates if the test event succeeded or failed.
- `request_id` (string) - The ID for each request.

### 400 - Bad Request

- `request_id` (string) - The request ID.
- `error` (object) - The response error object.
  - `type` (string) - The error type.
  - `message` (string) - The error message.
  - `provider_error` (object) - The error from the provider.

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.us.nylas.com/v3/webhooks/send-test-event' \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <NYLAS_API_KEY>' \
  --data '{
    "trigger_type": "calendar.created",
    "webhook_url": "<WEBHOOK_URL>"
  }'
```
