Skip to main content
PATCH
/
api
/
v1
/
business
/
webhooks
/
{id}
Update Webhook
curl --request PATCH \
  --url https://api-stage.ugift.me/api/v1/business/webhooks/{id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "url": "https://hooks.example.com/ugiftme/v2/inbound",
  "events": [
    "order.succeeded",
    "wallet.updated"
  ],
  "isActive": true
}
'
{
  "message": "Webhook updated successfully",
  "webhook": {
    "_id": "65d3f4a5b6c7d89012345678",
    "businessId": "507f1f77bcf86cd799439011",
    "url": "https://hooks.example.com/ugiftme/v2/inbound",
    "events": [
      "order.succeeded",
      "wallet.updated"
    ],
    "isActive": true,
    "description": "Production order notifications",
    "createdAt": "2025-03-01T10:00:00.000Z",
    "updatedAt": "2025-04-11T08:15:00.000Z"
  }
}

Authorizations

X-API-Key
string
header
required

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

id
string
required

Body

application/json

At least one property must be present. Omitted fields are left unchanged. The signing secret cannot be updated via this endpoint.

url
string<uri>

HTTPS (or HTTP) URL that will receive outbound POST deliveries.

events
enum<string>[]
Minimum array length: 1
Available options:
order.queued,
order.processing,
order.succeeded,
order.failed,
product.updated,
wallet.updated
description
string
isActive
boolean

When false, UGiftMe stops sending events to this URL until set back to true.

Response

Updated; signing secret is not returned

message
string
required
Example:

"Webhook updated successfully"

webhook
object
required

Webhook configuration without signing secret.

Example:
{
"_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"
}