Update webhook subscription BETA
PUT
/v2/webhooks/subscriptions/{subscription_id}
Updates a webhook subscription.
Name | Description |
---|---|
subscription_
Required
|
[REQUIRED] The ID of the Subscription to update. |
Name | Description |
---|---|
subscription
|
The Subscription to update. |
Response Fields
Name | Description |
---|---|
errors
|
Information on errors encountered during the request. |
subscription
|
The updated Subscription. |
Examples
PUT
/v2/webhooks/subscriptions/{subscription_id}
cURL
- cURL
- Ruby
- Python
- C#
- Java
- PHP
- Node.js
curl https://connect.squareup.com/v2/webhooks/subscriptions/wbhk_b35f6b3145074cf9ad513610786c19d5 \
-X PUT \
-H 'Square-Version: 2023-01-19' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"subscription": {
"name": "Updated Example Webhook Subscription",
"enabled": false
}
}'
Response JSON
{
"subscription": {
"id": "wbhk_b35f6b3145074cf9ad513610786c19d5",
"name": "Updated Example Webhook Subscription",
"enabled": false,
"event_types": [
"payment.created",
"payment.updated"
],
"notification_url": "https://example-webhook-url.com",
"api_version": "2021-12-15",
"created_at": "2022-01-10 23:29:48 +0000 UTC",
"updated_at": "2022-01-10 23:45:51 +0000 UTC"
}
}