# POST /v1/webhooks/{endpoint_id}/test

> Send a sample event now.

In [Webhooks and events API](https://vestra.ai/developers/reference/api/webhooks-and-events.md): Where events go, how each delivery went, and the record of every event.

Send `Authorization: Bearer vk_test_...` on every call.

Send a sample event now.

Your API key, scope `setup` or `all`. On the card: [`events`](https://vestra.ai/developers/events.md). Every call here is a checked sample.

## Request

Path:

- `endpoint_id` (`string`, required): The webhook endpoint's id (`whk_...`).

Headers:

- `Idempotency-Key` (`string`): Send the same key to retry this call safely for 24 hours.

## Answers 200

- `ok` (`boolean`): Whether your endpoint answered 2xx to a signed webhook.test event.
- `status_code` (`integer | null`): What it answered; null when it did not answer.
- `duration_ms` (`integer`): How long it took, in milliseconds: 10 seconds at most.
- `error` (`string | null`): What went wrong, such as a timeout; null when it answered.

## Code

**HTTP**

```bash
# Register your endpoint and the events it wants. The signing secret is in the answer, shown once.
curl "$VESTRA_BASE_URL/v1/webhooks" \
  -H "Authorization: Bearer $VESTRA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://hooks.example.com/vestra", "events": ["task.completed", "interaction.created"] }'

# Send a sample event now, to see your endpoint answer.
curl -X POST "$VESTRA_BASE_URL/v1/webhooks/whk_9sd/test" \
  -H "Authorization: Bearer $VESTRA_API_KEY"
```

**TypeScript, Python, CLI, MCP**: No sample in your language for this route, so here it is over HTTP.
