Bag is live โ€” accept USDC & card payments globally. Get started โ†’
BagBag Docs
API ReferenceWebhooks

Update a webhook endpoint

Updates an existing webhook endpoint's URL, subscribed events, or active status. Only the fields you include in the request body are changed.

PATCH
/api/webhooks
AuthorizationBearer <token>

API key authentication for programmatic access. Include your key in the Authorization header:

Authorization: Bearer bag_live_sk_a1b2c3d4e5f6...

Keys are prefixed with bag_live_sk_ (production) or bag_test_sk_ (sandbox). Generate keys from the Bag Dashboard.

In: header

Request Body

application/json

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "https://getbags.app/api/webhooks" \  -H "Content-Type: application/json" \  -d '{    "id": "f6a7b8c9-d0e1-4f2a-3b4c-5d6e7f8a9b0c",    "events": [      "payment.completed",      "payment.failed",      "subscription.created"    ],    "active": true  }'
{
  "status": "success",
  "data": {
    "id": "f6a7b8c9-d0e1-4f2a-3b4c-5d6e7f8a9b0c",
    "url": "https://api.example.com/webhooks/bag-v2",
    "events": [
      "payment.completed",
      "payment.failed",
      "subscription.created"
    ],
    "active": true,
    "createdAt": "2026-01-15T08:00:00.000Z"
  }
}
{
  "status": "error",
  "message": "amount: Amount must be a positive number up to 999,999,999.99; network: Invalid enum value",
  "code": "BAD_REQUEST"
}
{
  "status": "error",
  "message": "Invalid or revoked API key",
  "code": "UNAUTHORIZED",
  "hint": "Include a valid API key in the Authorization header: Bearer bag_live_sk_..."
}
{
  "status": "error",
  "message": "Not found",
  "code": "NOT_FOUND"
}