Template Docs Commerce APIs Webhooks
Get Started
Get Started

Retrieve all webhook subscriptions

GET /api.squarespace.com/{api-version}/webhook_subscriptions

Retrieves information for all webhook subscriptions.

The response contains up to 25 Webhook Subscriptions.

Parameters

{api-version} string
required

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

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" \
  -i \
  -H "Authorization: Bearer YOUR_OAUTH_TOKEN" \
  -H "User-Agent: YOUR_CUSTOM_APP_DESCRIPTION"

Response example

A successful request generates a JSON response with an array of Webhook Subscriptions.

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

{
  // Array of Webhook Subscription resources.
  // If the merchant site doesn't have any webhook subscriptions, this array is empty.
  "webhookSubscriptions": [
    {
      // Unique Webhook Subscription id.
      "id": "7aff04bb-90e0-4002-96c2-69d8162c8dae",
      // HTTPS URL that receives webhook notifications.
      "endpointUrl": "https://example-extension.com/uninstall",
      // List of event topics that trigger a webhook notification.
      // Possible values include: `extension.uninstall`, `order.create`, `order.update`. 
      "topics": ["extension.uninstall"],
      // ISO 8601 UTC date and time string; represents when the webhook subscription was created. 
      "createdOn": "2020-04-22T22:18+00:00",
      // ISO 8601 UTC date and time string; represents when the webhook subscription was last modified.
      "updatedOn": "2020-04-22T22:18+00:00"
    }
  ]
}

Status codes and error conditions

200 OK

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