Skip to main content

Test a webhook configuration

POST 

/v2/webhooks/events/test

Test a webhook configuration by sending a simulated event to the configured target URL.

Requirements:

  • You must provide the ID of a webhook configuration created via the Create Webhook Configuration endpoint.
  • The webhook configuration must be inactive (is_active: false). Tests are not permitted for active webhooks.

Request Body:

  • webhook_config_id (string, required): The UUID of the webhook configuration to test.
  • event_type (string, required): The event type to simulate (created, updated, or deleted).
  • source (string, required): The resource type to simulate (e.g., form, response, packet_response, packet, document, patient).
  • source_id (string, required): The ID of the resource to use as the event source.

Example:

{
"webhook_config_id": "b1e2c3d4-5678-90ab-cdef-1234567890ab",
"event_type": "created",
"source": "patient",
"source_id": "aabbccdd-1122-3344-5566-77889900aabb"
}

Responses:

  • 201: Webhook event test was successfully created and sent to the target URL.
    • Example: { "detail": "Webhook event test created." }
  • 400: Missing required fields, invalid webhook config, or webhook config is active.
    • Example: { "detail": "Webhook config ID is required." }
    • Example: { "detail": "Tests are not allowed for active webhooks." }
  • 404: The provided webhook configuration does not exist.
    • Example: { "detail": "Webhook config not found." }
  • 500: An unexpected error occurred while creating the test event.
    • Example: { "detail": "Failed to create webhook event. We've been notified." }

Note: The test event will be delivered to the target_url specified in your webhook configuration, with the same payload and headers as a real event (including the X-Zentake-Signature header). Use this endpoint to verify your endpoint's ability to receive and process Zentake webhook events before activating your webhook configuration. You also can check the webhook events in the Webhook Events endpoint.

Request

Responses