Skip to main content
PATCH
https://api.bunship.com
/
api
/
v1
/
organizations
/
{orgId}
/
webhooks
/
{id}
Update Webhook Endpoint
curl --request PATCH \
  --url https://api.bunship.com/api/v1/organizations/{orgId}/webhooks/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>",
  "description": "<string>",
  "events": [
    "<string>"
  ],
  "isActive": true
}
'
{
  "success": true,
  "data": {
    "id": "wh_abc123",
    "organizationId": "org_cld2abc123def456",
    "url": "https://example.com/webhooks/bunship-v2",
    "description": "Updated webhook handler",
    "events": ["member.added", "member.removed", "subscription.updated"],
    "isActive": true,
    "createdAt": "2024-01-15T10:00:00Z",
    "updatedAt": "2024-01-21T09:00:00Z"
  }
}
Updates an existing webhook endpoint’s configuration. Only included fields are modified.

Auth

Requires a valid Bearer token. User must be a member of the organization.

Path Parameters

orgId
string
required
Organization identifier.
id
string
required
Webhook endpoint identifier.

Request Body

All fields are optional.
url
string
Updated webhook delivery URL. Must be a valid HTTPS URI.
description
string
Updated description.
events
string[]
Updated list of subscribed event types.
isActive
boolean
Set to false to pause deliveries, true to resume.

Response

Returns the updated webhook endpoint object.
{
  "success": true,
  "data": {
    "id": "wh_abc123",
    "organizationId": "org_cld2abc123def456",
    "url": "https://example.com/webhooks/bunship-v2",
    "description": "Updated webhook handler",
    "events": ["member.added", "member.removed", "subscription.updated"],
    "isActive": true,
    "createdAt": "2024-01-15T10:00:00Z",
    "updatedAt": "2024-01-21T09:00:00Z"
  }
}

Example

curl -X PATCH https://api.bunship.com/api/v1/organizations/org_cld2abc123def456/webhooks/wh_abc123 \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/webhooks/bunship-v2",
    "events": ["member.added", "member.removed", "subscription.updated"]
  }'