---
search:
  tags:
    - webhooks
    - POST
seo:
  description: >-
    Reference for the POST /v1/webhook-endpoints/{endpointId}/test endpoint in
    the Vortex Payments API.
sidebar:
  label: POST /v1/webhook-endpoints/{endpointId}/test
  badge: POST
title: POST /v1/webhook-endpoints/{endpointId}/test
type: openapi-operation
---
`POST /v1/webhook-endpoints/{endpointId}/test`

**curl**

```bash
curl "https://api.vortex.nyc/v1/webhook-endpoints/{endpointId}/test?environment=sandbox&merchantAccountId=..." \
  -X POST \
  -H "Authorization: Bearer $VORTEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"eventType":"invoice.paid","dispatch":true}'
```

**TypeScript**

```ts
import { testWebhookEndpoint, createVortex } from "@vortex-api/vortex/2026-09";

const vortex = createVortex({ apiKey: process.env.VORTEX_API_KEY });
const { data } = await testWebhookEndpoint({
  client: vortex,
  path: { endpointId: "..." },
  query: { environment: "sandbox", merchantAccountId: "..." },
  body: {"eventType":"invoice.paid","dispatch":true},
});
```

**Request body** (`application/json`, required)

- `eventType` (string, required)
- `dispatch` (boolean | null)

Request body example:

```json
{
  "eventType": "string",
  "dispatch": true
}
```

**Responses**

- `200` — Success

Response example, 200:

```json
{
  "data": {
    "id": "string",
    "environment": "sandbox",
    "endpointId": "string",
    "eventType": "string",
    "aggregateType": "string",
    "aggregateId": "string",
    "status": "pending",
    "attemptCount": 0,
    "lastAttemptAt": "string",
    "httpStatusCode": 0,
    "failureReason": "string",
    "canonicalEventId": "string",
    "replayedFromDeliveryId": "string",
    "createdAt": "string",
    "updatedAt": "string"
  },
  "requestId": "string"
}
```
