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

# Testing your endpoint

> Send yourself a sample event without placing a call.

Once your endpoint is registered, send a sample event from the API or from
the dashboard (**Settings → Developers → Webhooks → Send a test event**):

```json theme={null}
POST /v1/webhook-endpoints/{id}/test
{ "event": "call.analyzed" }        // optional, default call.ended
```

```json theme={null}
{ "delivery_id": "...", "status": "succeeded", "status_code": 200, "error": null }
```

The sample carries `call_id: "call_test_00000000"` and `metadata: {"test": true}`
so your handler can recognize it. It is signed with your real secret. Test
sends appear in the delivery log with `event: test`, one attempt, no retries.

## Reading the result

| Result                      | What it means                                                                                                                                                                                              |
| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `status: succeeded`         | Your server answered `2xx`. You're done.                                                                                                                                                                   |
| `status_code: 401` or `403` | Your server rejected the request as unauthorized. Usually the signature check. Verify against the raw body with the current secret, and remember that webhooks carry a signature header, not your API key. |
| `status_code: 404`          | The URL path doesn't exist on your server.                                                                                                                                                                 |
| `status_code: 5xx`          | Your handler threw. Check its logs for the request with `X-Contour-Delivery-Id` equal to `delivery_id`.                                                                                                    |
| `error` set, no status code | We couldn't connect: DNS, TLS, or a timeout after 10 seconds.                                                                                                                                              |

## No receiver yet? Use a capture service

To see exactly what we send before writing any code, create a URL at
[webhook.site](https://webhook.site), register it as an endpoint, and send a
test event. The request appears live with the full body and every header,
including `X-Contour-Signature`. webhook.site answers `200` by default, so
the delivery shows as succeeded.

<Warning>
  Capture-service URLs are public. Use them only for test events, never for an
  endpoint that will receive real calls.
</Warning>

## Local development

Your endpoint URL must be `https` and publicly reachable, so a `localhost`
receiver is rejected. Expose it with a tunnel such as ngrok or Cloudflare
Tunnel and register the tunnel's `https` URL.
