Update Webhook
Updates an existing webhook subscription (configuration stored in UGiftMe).
This does not change how you receive deliveries: UGiftMe still POSTs event payloads to your URL.
Use PATCH to change the target URL, subscribed events, description, or pause/resume (isActive) without deleting and
re-creating the webhook (the signing secret is unchanged).
Provide at least one of url, events, description, isActive. When updating events, the array must be
non-empty and only contain allowed event types.
How to call — PATCH {server}/api/v1/business/webhooks/{id} with X-API-Key and a JSON body.
Authorizations
Your UGiftMe API key for authentication.
Format: Secure API key (e.g., <your-api-key>)
Required: All endpoints require this header
Example: X-API-Key: <your-api-key>
Path Parameters
Body
At least one property must be present. Omitted fields are left unchanged. The signing secret cannot be updated via this endpoint.
HTTPS (or HTTP) URL that will receive outbound POST deliveries.
1order.queued, order.processing, order.succeeded, order.failed, product.updated, wallet.updated When false, UGiftMe stops sending events to this URL until set back to true.
Response
Updated; signing secret is not returned
"Webhook updated successfully"
Webhook configuration without signing secret.
{
"_id": "65d3f4a5b6c7d89012345678",
"businessId": "507f1f77bcf86cd799439011",
"url": "https://hooks.example.com/ugiftme/inbound",
"events": ["order.succeeded", "wallet.updated"],
"isActive": true,
"description": "Production order notifications",
"lastUsed": "2025-04-11T08:15:00.000Z",
"deliveryStats": { "success": 142, "failed": 2 },
"createdAt": "2025-03-01T10:00:00.000Z",
"updatedAt": "2025-04-11T08:15:00.000Z"
}