PATCH/api/v1/webhooks/{uuid}

Update webhook

Partially updates an existing webhook endpoint for the current company. Only the fields provided in the request body are changed — omitted fields retain their current values.

PATCH /api/v1/webhooks/{uuid}

Headers

NameTypeRequiredDescription
AuthorizationstringYesBearer token for authentication
X-CompanystringYesCompany UUID to scope the request
Content-TypestringYesMust be application/json

Path parameters

NameTypeRequiredDescription
uuidstringYesWebhook endpoint UUID

Request body

All fields are optional. At least one field must be provided.

NameTypeRequiredDescription
urlstringNoNew HTTPS destination URL
eventsarrayNoReplacement list of event type names to subscribe to
descriptionstringNoUpdated human-readable label
isActivebooleanNoEnable (true) or pause (false) deliveries
💡

Providing events replaces the entire subscription list — it is not additive. Send the complete desired set of event types each time.

Request

curl -X PATCH https://api.storno.ro/api/v1/webhooks/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "X-Company: 550e8400-e29b-41d4-a716-446655440000" \
  -H "Content-Type: application/json" \
  -d '{
    "events": ["invoice.created", "invoice.validated", "invoice.rejected", "invoice.paid", "sync.completed"],
    "description": "Production notifications — expanded",
    "isActive": true
  }'

Response

Returns the updated webhook endpoint object.

{
  "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "url": "https://your-app.example.com/webhooks/storno",
  "description": "Production notifications — expanded",
  "events": [
    "invoice.created",
    "invoice.validated",
    "invoice.rejected",
    "invoice.paid",
    "sync.completed"
  ],
  "isActive": true,
  "secret": "whsec_••••••••••••••••••••••••",
  "createdAt": "2026-02-10T09:00:00Z",
  "updatedAt": "2026-02-18T10:15:00Z"
}

Response fields

FieldTypeDescription
uuidstringUnique identifier for the webhook endpoint
urlstringCurrent destination URL
descriptionstringCurrent description label
eventsarrayCurrent list of subscribed event type names
isActivebooleanCurrent active state
secretstringMasked signing secret (unchanged by this operation)
createdAtstringISO 8601 creation timestamp
updatedAtstringISO 8601 timestamp of this update

Error codes

CodeDescription
400Validation error — no fields provided or invalid data format
401Missing or invalid authentication token
403Insufficient permissions — requires webhook.manage permission
404Webhook endpoint not found for this company
422Business validation error — URL must use HTTPS, or unknown event type specified