Template Docs Commerce APIs Webhooks Custom Code Upcoming Changes
Get Started
Get Started

Send test notification

POST /api.squarespace.com/{api-version}/webhook_subscriptions/{id}/actions/sendTestNotification

Sends a notification to a subscribed webhook endpoint for testing purposes. This is a one-time notification, and will not be retried if it fails or times out.

The response contains the status code returned by the subscribed webhook endpoint.

Parameters

{api-version} string
required

See the Webhook Subscriptions API Overview page for the current API version.


{id} string
required

Specifies the Webhook Subscription to send a notification to.

Request example

Read the Overview to learn about specific API permissions. Every request should also abide by Squarespace rate limits.

curl "https://api.squarespace.com/1.0/webhook_subscriptions/123/actions/sendTestNotification" \ -i \ -H "Authorization: Bearer YOUR_OAUTH_TOKEN" \ -H "User-Agent: YOUR_CUSTOM_APP_DESCRIPTION" \ -H "Content-Type: application/json" \ -X POST \ -d '{' \ # Required; string. # Squarespace event topic that triggers a webhook notification. # Possible values include: `extension.uninstall`, `order.create`, `order.update`. '"topic": "extension.uninstall",' \ '}'

Response example

A successful request generates a JSON response with the status code returned from the webhook endpoint.

Note: For easier reference between response fields and descriptions, comments were added in the example, though this makes the JSON invalid.

{ // Status code returned by the subscribed webhook endpoint. "statusCode": 200 }

Status codes and error conditions

200 OK

The request was successful. The message body contains data in the format specified above.


400 BAD REQUEST

Type: INVALID_REQUEST_ERROR

Subtype: null
The request body does not conform to the required specification.


404 NOT FOUND

Type: INVALID_REQUEST_ERROR

Subtype: INVALID_ARGUMENT The requested Webhook Subscription was not found.