Skip to main content

Webhook Payload Structure

When an execution (or batch) finishes, Voidr sends a POST request to the configured webhook endpoint.

HTTP Method and Headers

  • HTTP Method: POST
  • Headers:
    • Content-Type: application/json
    • User-Agent: Voidr-Webhook/1.0

Payload Structure

The payload has the following high-level format:
{
  "type": "pipeline_report",
  "timestamp": "ISO_8601_TIMESTAMP",
  "summary": {
    "total": 0,
    "success": 0,
    "failed": 0,
    "duration": 0,
    "durationMinutes": "0.00"
  },
  "reports": [
    {
      "id": "EXECUTION_ID",
      "name": "TEST_PLAN_NAME",
      "environment": "YOUR_ENVIRONMENT",
      "status": "PASSED",
      "duration": 0,
      "durationMinutes": "0.00",
      "stats": { "total": 0, "success": 0, "failed": 0, "skipped": 0 },
      "reportUrl": "REPORT_URL",
      "failedTests": [{ "suite": "...", "test": "...", "title": "..." }],
      "modules": [
        {
          "moduleSlug": "MODULE_SLUG",
          "moduleName": "MODULE_NAME",
          "duration": 0,
          "durationMinutes": "0.00",
          "stats": { "total": 0, "passed": 0, "failed": 0, "skipped": 0 },
          "failedTests": [{ "suite": "...", "test": "...", "title": "..." }]
        }
      ]
    }
  ]
}

Webhook Endpoint Requirements

Your webhook endpoint should:
  1. Accept POST requests with Content-Type: application/json
  2. Respond with 2xx status code to acknowledge receipt
  3. Process asynchronously if performing time-consuming operations
  4. Implement retry logic if your endpoint might be temporarily unavailable
  5. Validate the payload structure before processing

Next Steps