Update webhook subscription signature key BETA
POST
/v2/webhooks/subscriptions/{subscription_id}/signature-key
Updates a webhook subscription by replacing the existing signature key with a new one.
Name | Description |
---|---|
subscription_
Required
|
[REQUIRED] The ID of the Subscription to update. |
Name | Description |
---|---|
idempotency_
|
A unique string that identifies the UpdateWebhookSubscriptionSignatureKey request. |
Response Fields
Name | Description |
---|---|
errors
|
Information on errors encountered during the request. |
signature_
|
Read only The new Square-generated signature key used to validate the origin of the webhook event. |
Examples
POST
/v2/webhooks/subscriptions/{subscription_id}/signature-key
cURL
- cURL
- Ruby
- Python
- C#
- Java
- PHP
- Node.js
curl https://connect.squareup.com/v2/webhooks/subscriptions/subscription_id0/signature-key \
-X POST \
-H 'Square-Version: 2023-01-19' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"idempotency_key": "ed80ae6b-0654-473b-bbab-a39aee89a60d"
}'
Response JSON
{
"signature_key": "1k9bIJKCeTmSQwyagtNRLg"
}