# Register Webhook Register a webhook URL to receive real-time event notifications. Once registered, you will receive webhook events for: - Shipment creation and updates - Prescription status changes - Medication order status updates Webhooks are sent via HTTPS POST requests with an x-api-key header for authentication. Endpoint: POST /api/external/webhook Version: 1.0.0 Security: ApiKeyAuth ## Request fields (application/json): - `clinic_id` (string, required) UUID of the clinic associated with this webhook Example: "550e8400-e29b-41d4-a716-446655440000" - `webhook_url` (string, required) HTTPS URL where webhook events will be sent Example: "https://partner.example.com/webhooks/novamed" ## Response 200 fields (application/json): - `success` (boolean) Example: true - `data` (object) - `data.webhook_id` (string) Unique identifier for the registered webhook Example: "bb0e8400-e29b-41d4-a716-446655440006" - `message` (string) Example: "Webhook created successfully" ## Response 400 fields (application/json): - `success` (boolean) - `error` (object) - `error.message` (string) Human-readable error message Example: "Validation error" - `error.details` (object) Additional error details Example: {} ## Response 401 fields (application/json): - `success` (boolean) - `error` (object) - `error.message` (string) Human-readable error message Example: "Validation error" - `error.details` (object) Additional error details Example: {}