Skip to content

Update a webhook subscription

Request

🔐 Required role: EVNT_SUB

📖 Data dictionary: Event subscription

Update an existing webhook subscription

Modify subscription properties such as delivery URL, filter expression, or description. Only provided fields will be updated.

Business Applications:

  • Update webhook URLs
  • Modify event filters
Security
(BearerAuth and CfAccessClientId and CfAccessClientSecret) or BearerAuth
Path
idinteger, (int64)required

Event subscription id.

Example:9
Bodyapplication/jsonrequired
entityTypestring or null

Entity of the event, as the entity value of a catalog entry (GET /api/v1/event-subscriptions/catalog).

Example:"RequestItem"
operationstring or null

Operation of the event, as the operation value of a catalog entry.

Enum:"CREATED""UPDATED""DELETED""SIGNED""EXECUTED""CANCELLED""FAILED""POSTED""APPROVED""REJECTED"
Example:"SENT"
deliveryUrlstring or null

Deliveryurl

filterExpressionstring or null

Narrows what this subscription receives. Supported values: ownPaymentLinksOnly (only payments made through quick payment links minted by the API user that owns this subscription; links minted through the SafeSend application-key route have no minting user and never match), paymentLinkOnly (payments made through any quick payment link of the firm) and allPayments (every payment of the firm). The last two are accepted only while the API user holds the PYMT_EVNT_ALL Product API role, and stop delivering if the firm revokes it. Any other value is rejected with 400. Required for Payment subscriptions; optional for other entity types, where omitting it means every event of the entity and operation.

Example:"ownPaymentLinksOnly"
descriptionstring or null

Description

activeboolean or null

Active

curl -i -X PATCH \
  https://api.sandbox.aiwyn.app/api/v1/event-subscriptions/9 \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'CF-Access-Client-Id: YOUR_API_KEY_HERE' \
  -H 'CF-Access-Client-Secret: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "entityType": "RequestItem",
    "operation": "SENT",
    "deliveryUrl": "string",
    "filterExpression": "ownPaymentLinksOnly",
    "description": "string",
    "active": true
  }'

Responses

Event Subscriptions updated successfully

Bodyapplication/json
dataobject
errorobject or null
metaobject
Response
{ "data": { "id": 0, "staffId": 0, "entityType": "RequestItem", "operation": "SENT", "deliveryUrl": "string", "description": "string", "filterExpression": "string", "active": true, "status": "ACTIVE", "createdAt": 1793322409.066411, "updatedAt": 1793322409.066411, "isInternal": true, "productApiSystemUserId": 0, "eventEnabled": true }, "error": {}, "meta": { "success": true, "message": "string", "timestamp": "2019-08-24T14:15:22Z", "version": "string" } }