# Test MFA Webhook Endpoint
URL: /docs/api-reference/multi-factor-authentication-mfa/testMfaWebhook

## POST `/api/v1/public/mfa/workflows/test-webhook`

**Summary:** Test MFA Webhook Endpoint
**Operation ID:** `testMfaWebhook`

Dispatches a simulated ping event with a computed `X-SmsPro-Signature` HMAC to test customer webhook server integration.

**Authentication:** `X-Api-Key: sk_live_...` or `Authorization: Bearer sk_live_...`

### Request Body (`application/json`)

```json
{
  "type": "object",
  "required": [
    "webhookUrl"
  ],
  "properties": {
    "webhookUrl": {
      "type": "string",
      "format": "uri",
      "example": "https://myapp.com/api/webhooks/mfa"
    },
    "webhookSecret": {
      "type": "string",
      "example": "whsec_948f293048a1b2c3d4e5f60718"
    }
  }
}
```

### Responses

- **`200`**: Webhook test dispatch result with status code and latency

```json
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "example": "success"
    },
    "message": {
      "type": "string",
      "example": "MFA webhook test dispatched"
    },
    "data": {
      "type": "object",
      "properties": {
        "delivered": {
          "type": "boolean",
          "example": true
        },
        "statusCode": {
          "type": "integer",
          "example": 200
        },
        "latencyMs": {
          "type": "integer",
          "example": 142
        }
      }
    }
  }
}
```
- **`401`**: Authentication failed or API key missing